From 26d1ee070fd767a2c4eff75ccb58cabda9d21bc9 Mon Sep 17 00:00:00 2001 From: platform CI Date: Tue, 7 Jan 2025 00:01:22 +0000 Subject: [PATCH] Update clients to latest platform release --- .../.github/workflows/python.yml | 31 + platform_api_python_client/.gitignore | 66 + platform_api_python_client/.gitlab-ci.yml | 31 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 134 + .../.openapi-generator/VERSION | 1 + platform_api_python_client/.travis.yml | 17 + platform_api_python_client/README.md | 204 + .../docs/APIKeyRequest.md | 29 + .../docs/APIKeyResponse.md | 31 + .../docs/CServeRecipe.md | 53 + .../docs/CServeRecipePerf.md | 32 + .../docs/CServeRecipeResponse.md | 33 + .../docs/CServeV2Recipe.md | 57 + .../docs/CServeV2RecipeInput.md | 57 + .../docs/CServeV2RecipeOutput.md | 57 + .../docs/CreateCServeDeploymentRequest.md | 38 + .../docs/CreateCServeDeploymentResponse.md | 31 + .../docs/CreateCServeV2DeploymentRequest.md | 38 + .../docs/CreateCServeV2DeploymentResponse.md | 31 + .../docs/CreateCheckoutRequest.md | 30 + .../docs/CreateCheckoutResponse.md | 29 + .../docs/CreateComputeDeploymentRequest.md | 35 + .../docs/CreateComputeDeploymentResponse.md | 33 + .../docs/CreateInferenceDeploymentRequest.md | 41 + .../docs/CreateInferenceDeploymentResponse.md | 31 + .../docs/CreateRagDeploymentRequest.md | 39 + .../docs/CreateRagDeploymentResponse.md | 31 + .../docs/CreditsResponse.md | 29 + .../docs/DailyBillResponse.md | 30 + .../docs/DeploymentStatus.md | 14 + .../docs/DeploymentStatusRequest.md | 29 + .../docs/DeploymentStatusResponse.md | 34 + .../docs/DeploymentType.md | 28 + .../docs/DeploymentUsageValue.md | 30 + .../docs/EXTERNALApi.md | 2450 +++++ .../docs/GetCServeDeploymentResponse.md | 66 + .../docs/GetCServeV2DeploymentResponse.md | 43 + .../docs/GetClusterResponse.md | 31 + .../docs/GetComputeDeploymentResponse.md | 41 + .../docs/GetDeploymentLogResponse.md | 30 + .../docs/GetDeploymentResponse.md | 37 + .../docs/GetDeploymentUsageResponse.md | 29 + .../docs/GetInferenceDeploymentResponse.md | 46 + .../docs/GetPaymentsResponse.md | 30 + .../docs/GetRagDeploymentResponse.md | 44 + .../docs/HTTPValidationError.md | 29 + .../docs/HardwareInstanceResponse.md | 38 + .../docs/ListAPIKeyResponse.md | 29 + .../docs/ListCServeRecipeResponse.md | 29 + .../docs/ListDailyBillResponse.md | 29 + .../docs/ListGetClusterResponse.md | 29 + .../docs/ListGetDeploymentResponse.md | 29 + .../docs/ListHardwareInstanceResponse.md | 29 + .../docs/ListPrebuiltImageResponse.md | 29 + .../docs/ListUserVaultItemsResponse.md | 29 + platform_api_python_client/docs/Metric.md | 14 + .../docs/PrebuiltImageResponse.md | 34 + .../docs/ServiceStatus.md | 32 + .../docs/UserSupportEmailRequest.md | 31 + .../docs/UserVaultItemInput.md | 31 + .../docs/UserVaultItemOutput.md | 31 + .../docs/UserVaultType.md | 16 + .../docs/ValidationError.md | 31 + .../docs/ValidationErrorLocInner.md | 28 + platform_api_python_client/git_push.sh | 57 + .../platform_api_python_client/__init__.py | 88 + .../api/__init__.py | 5 + .../api/external_api.py | 8515 +++++++++++++++++ .../platform_api_python_client/api_client.py | 797 ++ .../api_response.py | 21 + .../configuration.py | 458 + .../platform_api_python_client/exceptions.py | 199 + .../models/__init__.py | 71 + .../models/api_key_request.py | 87 + .../models/api_key_response.py | 92 + .../models/c_serve_recipe.py | 224 + .../models/c_serve_recipe_perf.py | 98 + .../models/c_serve_recipe_response.py | 105 + .../models/c_serve_v2_recipe.py | 186 + .../models/c_serve_v2_recipe_input.py | 186 + .../models/c_serve_v2_recipe_output.py | 186 + .../create_c_serve_deployment_request.py | 125 + .../create_c_serve_deployment_response.py | 92 + .../create_c_serve_v2_deployment_request.py | 125 + .../create_c_serve_v2_deployment_response.py | 92 + .../models/create_checkout_request.py | 89 + .../models/create_checkout_response.py | 87 + .../create_compute_deployment_request.py | 110 + .../create_compute_deployment_response.py | 101 + .../create_inference_deployment_request.py | 142 + .../create_inference_deployment_response.py | 92 + .../models/create_rag_deployment_request.py | 127 + .../models/create_rag_deployment_response.py | 92 + .../models/credits_response.py | 87 + .../models/daily_bill_response.py | 90 + .../models/deployment_status.py | 38 + .../models/deployment_status_request.py | 88 + .../models/deployment_status_response.py | 115 + .../models/deployment_type.py | 45 + .../models/deployment_usage_value.py | 89 + .../models/get_c_serve_deployment_response.py | 264 + .../get_c_serve_v2_deployment_response.py | 137 + .../models/get_cluster_response.py | 96 + .../models/get_compute_deployment_response.py | 134 + .../models/get_deployment_log_response.py | 94 + .../models/get_deployment_response.py | 111 + .../models/get_deployment_usage_response.py | 95 + .../get_inference_deployment_response.py | 159 + .../models/get_payments_response.py | 89 + .../models/get_rag_deployment_response.py | 139 + .../models/hardware_instance_response.py | 115 + .../models/http_validation_error.py | 95 + .../models/list_api_key_response.py | 95 + .../models/list_c_serve_recipe_response.py | 95 + .../models/list_daily_bill_response.py | 95 + .../models/list_get_cluster_response.py | 95 + .../models/list_get_deployment_response.py | 95 + .../models/list_hardware_instance_response.py | 95 + .../models/list_prebuilt_image_response.py | 95 + .../models/list_user_vault_items_response.py | 95 + .../models/metric.py | 38 + .../models/prebuilt_image_response.py | 103 + .../models/service_status.py | 47 + .../models/user_support_email_request.py | 91 + .../models/user_vault_item_input.py | 97 + .../models/user_vault_item_output.py | 97 + .../models/user_vault_type.py | 39 + .../models/validation_error.py | 99 + .../models/validation_error_loc_inner.py | 138 + .../platform_api_python_client/py.typed | 0 .../platform_api_python_client/rest.py | 257 + platform_api_python_client/pyproject.toml | 72 + platform_api_python_client/requirements.txt | 4 + platform_api_python_client/setup.cfg | 2 + platform_api_python_client/setup.py | 49 + .../test-requirements.txt | 6 + platform_api_python_client/test/__init__.py | 0 .../test/test_api_key_request.py | 52 + .../test/test_api_key_response.py | 56 + .../test/test_c_serve_recipe.py | 77 + .../test/test_c_serve_recipe_perf.py | 130 + .../test/test_c_serve_recipe_response.py | 300 + .../test/test_c_serve_v2_recipe.py | 106 + .../test/test_c_serve_v2_recipe_input.py | 82 + .../test/test_c_serve_v2_recipe_output.py | 106 + .../test_create_c_serve_deployment_request.py | 116 + ...test_create_c_serve_deployment_response.py | 56 + ...st_create_c_serve_v2_deployment_request.py | 124 + ...t_create_c_serve_v2_deployment_response.py | 56 + .../test/test_create_checkout_request.py | 54 + .../test/test_create_checkout_response.py | 52 + .../test_create_compute_deployment_request.py | 60 + ...test_create_compute_deployment_response.py | 58 + ...est_create_inference_deployment_request.py | 76 + ...st_create_inference_deployment_response.py | 56 + .../test_create_rag_deployment_request.py | 116 + .../test_create_rag_deployment_response.py | 56 + .../test/test_credits_response.py | 52 + .../test/test_daily_bill_response.py | 54 + .../test/test_deployment_status.py | 33 + .../test/test_deployment_status_request.py | 52 + .../test/test_deployment_status_response.py | 62 + .../test/test_deployment_type.py | 33 + .../test/test_deployment_usage_value.py | 54 + .../test/test_external_api.py | 213 + .../test_get_c_serve_deployment_response.py | 130 + ...test_get_c_serve_v2_deployment_response.py | 138 + .../test/test_get_cluster_response.py | 54 + .../test_get_compute_deployment_response.py | 80 + .../test/test_get_deployment_log_response.py | 58 + .../test/test_get_deployment_response.py | 68 + .../test_get_deployment_usage_response.py | 60 + .../test_get_inference_deployment_response.py | 98 + .../test/test_get_payments_response.py | 58 + .../test/test_get_rag_deployment_response.py | 132 + .../test/test_hardware_instance_response.py | 64 + .../test/test_http_validation_error.py | 58 + .../test/test_list_api_key_response.py | 62 + .../test/test_list_c_serve_recipe_response.py | 226 + .../test/test_list_daily_bill_response.py | 60 + .../test/test_list_get_cluster_response.py | 60 + .../test/test_list_get_deployment_response.py | 74 + .../test_list_hardware_instance_response.py | 70 + .../test/test_list_prebuilt_image_response.py | 72 + .../test_list_user_vault_items_response.py | 62 + .../test/test_metric.py | 33 + .../test/test_prebuilt_image_response.py | 66 + .../test/test_service_status.py | 33 + .../test/test_user_support_email_request.py | 56 + .../test/test_user_vault_item_input.py | 55 + .../test/test_user_vault_item_output.py | 56 + .../test/test_user_vault_type.py | 33 + .../test/test_validation_error.py | 60 + .../test/test_validation_error_loc_inner.py | 50 + platform_api_python_client/tox.ini | 9 + 196 files changed, 25956 insertions(+) create mode 100644 platform_api_python_client/.github/workflows/python.yml create mode 100644 platform_api_python_client/.gitignore create mode 100644 platform_api_python_client/.gitlab-ci.yml create mode 100644 platform_api_python_client/.openapi-generator-ignore create mode 100644 platform_api_python_client/.openapi-generator/FILES create mode 100644 platform_api_python_client/.openapi-generator/VERSION create mode 100644 platform_api_python_client/.travis.yml create mode 100644 platform_api_python_client/README.md create mode 100644 platform_api_python_client/docs/APIKeyRequest.md create mode 100644 platform_api_python_client/docs/APIKeyResponse.md create mode 100644 platform_api_python_client/docs/CServeRecipe.md create mode 100644 platform_api_python_client/docs/CServeRecipePerf.md create mode 100644 platform_api_python_client/docs/CServeRecipeResponse.md create mode 100644 platform_api_python_client/docs/CServeV2Recipe.md create mode 100644 platform_api_python_client/docs/CServeV2RecipeInput.md create mode 100644 platform_api_python_client/docs/CServeV2RecipeOutput.md create mode 100644 platform_api_python_client/docs/CreateCServeDeploymentRequest.md create mode 100644 platform_api_python_client/docs/CreateCServeDeploymentResponse.md create mode 100644 platform_api_python_client/docs/CreateCServeV2DeploymentRequest.md create mode 100644 platform_api_python_client/docs/CreateCServeV2DeploymentResponse.md create mode 100644 platform_api_python_client/docs/CreateCheckoutRequest.md create mode 100644 platform_api_python_client/docs/CreateCheckoutResponse.md create mode 100644 platform_api_python_client/docs/CreateComputeDeploymentRequest.md create mode 100644 platform_api_python_client/docs/CreateComputeDeploymentResponse.md create mode 100644 platform_api_python_client/docs/CreateInferenceDeploymentRequest.md create mode 100644 platform_api_python_client/docs/CreateInferenceDeploymentResponse.md create mode 100644 platform_api_python_client/docs/CreateRagDeploymentRequest.md create mode 100644 platform_api_python_client/docs/CreateRagDeploymentResponse.md create mode 100644 platform_api_python_client/docs/CreditsResponse.md create mode 100644 platform_api_python_client/docs/DailyBillResponse.md create mode 100644 platform_api_python_client/docs/DeploymentStatus.md create mode 100644 platform_api_python_client/docs/DeploymentStatusRequest.md create mode 100644 platform_api_python_client/docs/DeploymentStatusResponse.md create mode 100644 platform_api_python_client/docs/DeploymentType.md create mode 100644 platform_api_python_client/docs/DeploymentUsageValue.md create mode 100644 platform_api_python_client/docs/EXTERNALApi.md create mode 100644 platform_api_python_client/docs/GetCServeDeploymentResponse.md create mode 100644 platform_api_python_client/docs/GetCServeV2DeploymentResponse.md create mode 100644 platform_api_python_client/docs/GetClusterResponse.md create mode 100644 platform_api_python_client/docs/GetComputeDeploymentResponse.md create mode 100644 platform_api_python_client/docs/GetDeploymentLogResponse.md create mode 100644 platform_api_python_client/docs/GetDeploymentResponse.md create mode 100644 platform_api_python_client/docs/GetDeploymentUsageResponse.md create mode 100644 platform_api_python_client/docs/GetInferenceDeploymentResponse.md create mode 100644 platform_api_python_client/docs/GetPaymentsResponse.md create mode 100644 platform_api_python_client/docs/GetRagDeploymentResponse.md create mode 100644 platform_api_python_client/docs/HTTPValidationError.md create mode 100644 platform_api_python_client/docs/HardwareInstanceResponse.md create mode 100644 platform_api_python_client/docs/ListAPIKeyResponse.md create mode 100644 platform_api_python_client/docs/ListCServeRecipeResponse.md create mode 100644 platform_api_python_client/docs/ListDailyBillResponse.md create mode 100644 platform_api_python_client/docs/ListGetClusterResponse.md create mode 100644 platform_api_python_client/docs/ListGetDeploymentResponse.md create mode 100644 platform_api_python_client/docs/ListHardwareInstanceResponse.md create mode 100644 platform_api_python_client/docs/ListPrebuiltImageResponse.md create mode 100644 platform_api_python_client/docs/ListUserVaultItemsResponse.md create mode 100644 platform_api_python_client/docs/Metric.md create mode 100644 platform_api_python_client/docs/PrebuiltImageResponse.md create mode 100644 platform_api_python_client/docs/ServiceStatus.md create mode 100644 platform_api_python_client/docs/UserSupportEmailRequest.md create mode 100644 platform_api_python_client/docs/UserVaultItemInput.md create mode 100644 platform_api_python_client/docs/UserVaultItemOutput.md create mode 100644 platform_api_python_client/docs/UserVaultType.md create mode 100644 platform_api_python_client/docs/ValidationError.md create mode 100644 platform_api_python_client/docs/ValidationErrorLocInner.md create mode 100644 platform_api_python_client/git_push.sh create mode 100644 platform_api_python_client/platform_api_python_client/__init__.py create mode 100644 platform_api_python_client/platform_api_python_client/api/__init__.py create mode 100644 platform_api_python_client/platform_api_python_client/api/external_api.py create mode 100644 platform_api_python_client/platform_api_python_client/api_client.py create mode 100644 platform_api_python_client/platform_api_python_client/api_response.py create mode 100644 platform_api_python_client/platform_api_python_client/configuration.py create mode 100644 platform_api_python_client/platform_api_python_client/exceptions.py create mode 100644 platform_api_python_client/platform_api_python_client/models/__init__.py create mode 100644 platform_api_python_client/platform_api_python_client/models/api_key_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/api_key_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_recipe.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_recipe_perf.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_recipe_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_input.py create mode 100644 platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_output.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_checkout_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_checkout_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_compute_deployment_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_compute_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_inference_deployment_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_inference_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_rag_deployment_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/create_rag_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/credits_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/daily_bill_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/deployment_status.py create mode 100644 platform_api_python_client/platform_api_python_client/models/deployment_status_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/deployment_status_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/deployment_type.py create mode 100644 platform_api_python_client/platform_api_python_client/models/deployment_usage_value.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_c_serve_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_c_serve_v2_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_cluster_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_compute_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_deployment_log_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_deployment_usage_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_inference_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_payments_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/get_rag_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/hardware_instance_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/http_validation_error.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_api_key_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_c_serve_recipe_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_daily_bill_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_get_cluster_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_get_deployment_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_hardware_instance_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_prebuilt_image_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/list_user_vault_items_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/metric.py create mode 100644 platform_api_python_client/platform_api_python_client/models/prebuilt_image_response.py create mode 100644 platform_api_python_client/platform_api_python_client/models/service_status.py create mode 100644 platform_api_python_client/platform_api_python_client/models/user_support_email_request.py create mode 100644 platform_api_python_client/platform_api_python_client/models/user_vault_item_input.py create mode 100644 platform_api_python_client/platform_api_python_client/models/user_vault_item_output.py create mode 100644 platform_api_python_client/platform_api_python_client/models/user_vault_type.py create mode 100644 platform_api_python_client/platform_api_python_client/models/validation_error.py create mode 100644 platform_api_python_client/platform_api_python_client/models/validation_error_loc_inner.py create mode 100644 platform_api_python_client/platform_api_python_client/py.typed create mode 100644 platform_api_python_client/platform_api_python_client/rest.py create mode 100644 platform_api_python_client/pyproject.toml create mode 100644 platform_api_python_client/requirements.txt create mode 100644 platform_api_python_client/setup.cfg create mode 100644 platform_api_python_client/setup.py create mode 100644 platform_api_python_client/test-requirements.txt create mode 100644 platform_api_python_client/test/__init__.py create mode 100644 platform_api_python_client/test/test_api_key_request.py create mode 100644 platform_api_python_client/test/test_api_key_response.py create mode 100644 platform_api_python_client/test/test_c_serve_recipe.py create mode 100644 platform_api_python_client/test/test_c_serve_recipe_perf.py create mode 100644 platform_api_python_client/test/test_c_serve_recipe_response.py create mode 100644 platform_api_python_client/test/test_c_serve_v2_recipe.py create mode 100644 platform_api_python_client/test/test_c_serve_v2_recipe_input.py create mode 100644 platform_api_python_client/test/test_c_serve_v2_recipe_output.py create mode 100644 platform_api_python_client/test/test_create_c_serve_deployment_request.py create mode 100644 platform_api_python_client/test/test_create_c_serve_deployment_response.py create mode 100644 platform_api_python_client/test/test_create_c_serve_v2_deployment_request.py create mode 100644 platform_api_python_client/test/test_create_c_serve_v2_deployment_response.py create mode 100644 platform_api_python_client/test/test_create_checkout_request.py create mode 100644 platform_api_python_client/test/test_create_checkout_response.py create mode 100644 platform_api_python_client/test/test_create_compute_deployment_request.py create mode 100644 platform_api_python_client/test/test_create_compute_deployment_response.py create mode 100644 platform_api_python_client/test/test_create_inference_deployment_request.py create mode 100644 platform_api_python_client/test/test_create_inference_deployment_response.py create mode 100644 platform_api_python_client/test/test_create_rag_deployment_request.py create mode 100644 platform_api_python_client/test/test_create_rag_deployment_response.py create mode 100644 platform_api_python_client/test/test_credits_response.py create mode 100644 platform_api_python_client/test/test_daily_bill_response.py create mode 100644 platform_api_python_client/test/test_deployment_status.py create mode 100644 platform_api_python_client/test/test_deployment_status_request.py create mode 100644 platform_api_python_client/test/test_deployment_status_response.py create mode 100644 platform_api_python_client/test/test_deployment_type.py create mode 100644 platform_api_python_client/test/test_deployment_usage_value.py create mode 100644 platform_api_python_client/test/test_external_api.py create mode 100644 platform_api_python_client/test/test_get_c_serve_deployment_response.py create mode 100644 platform_api_python_client/test/test_get_c_serve_v2_deployment_response.py create mode 100644 platform_api_python_client/test/test_get_cluster_response.py create mode 100644 platform_api_python_client/test/test_get_compute_deployment_response.py create mode 100644 platform_api_python_client/test/test_get_deployment_log_response.py create mode 100644 platform_api_python_client/test/test_get_deployment_response.py create mode 100644 platform_api_python_client/test/test_get_deployment_usage_response.py create mode 100644 platform_api_python_client/test/test_get_inference_deployment_response.py create mode 100644 platform_api_python_client/test/test_get_payments_response.py create mode 100644 platform_api_python_client/test/test_get_rag_deployment_response.py create mode 100644 platform_api_python_client/test/test_hardware_instance_response.py create mode 100644 platform_api_python_client/test/test_http_validation_error.py create mode 100644 platform_api_python_client/test/test_list_api_key_response.py create mode 100644 platform_api_python_client/test/test_list_c_serve_recipe_response.py create mode 100644 platform_api_python_client/test/test_list_daily_bill_response.py create mode 100644 platform_api_python_client/test/test_list_get_cluster_response.py create mode 100644 platform_api_python_client/test/test_list_get_deployment_response.py create mode 100644 platform_api_python_client/test/test_list_hardware_instance_response.py create mode 100644 platform_api_python_client/test/test_list_prebuilt_image_response.py create mode 100644 platform_api_python_client/test/test_list_user_vault_items_response.py create mode 100644 platform_api_python_client/test/test_metric.py create mode 100644 platform_api_python_client/test/test_prebuilt_image_response.py create mode 100644 platform_api_python_client/test/test_service_status.py create mode 100644 platform_api_python_client/test/test_user_support_email_request.py create mode 100644 platform_api_python_client/test/test_user_vault_item_input.py create mode 100644 platform_api_python_client/test/test_user_vault_item_output.py create mode 100644 platform_api_python_client/test/test_user_vault_type.py create mode 100644 platform_api_python_client/test/test_validation_error.py create mode 100644 platform_api_python_client/test/test_validation_error_loc_inner.py create mode 100644 platform_api_python_client/tox.ini diff --git a/platform_api_python_client/.github/workflows/python.yml b/platform_api_python_client/.github/workflows/python.yml new file mode 100644 index 0000000..75ac225 --- /dev/null +++ b/platform_api_python_client/.github/workflows/python.yml @@ -0,0 +1,31 @@ +# 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: platform_api_python_client Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + 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={{packageName}} diff --git a/platform_api_python_client/.gitignore b/platform_api_python_client/.gitignore new file mode 100644 index 0000000..43995bd --- /dev/null +++ b/platform_api_python_client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/platform_api_python_client/.gitlab-ci.yml b/platform_api_python_client/.gitlab-ci.yml new file mode 100644 index 0000000..786e713 --- /dev/null +++ b/platform_api_python_client/.gitlab-ci.yml @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml + +stages: + - test + +.pytest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=platform_api_python_client + +pytest-3.8: + extends: .pytest + image: python:3.8-alpine +pytest-3.9: + extends: .pytest + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine diff --git a/platform_api_python_client/.openapi-generator-ignore b/platform_api_python_client/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/platform_api_python_client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/platform_api_python_client/.openapi-generator/FILES b/platform_api_python_client/.openapi-generator/FILES new file mode 100644 index 0000000..9f8364c --- /dev/null +++ b/platform_api_python_client/.openapi-generator/FILES @@ -0,0 +1,134 @@ +.github/workflows/python.yml +.gitignore +.gitlab-ci.yml +.travis.yml +README.md +docs/APIKeyRequest.md +docs/APIKeyResponse.md +docs/CServeRecipe.md +docs/CServeRecipePerf.md +docs/CServeRecipeResponse.md +docs/CServeV2RecipeInput.md +docs/CServeV2RecipeOutput.md +docs/CreateCServeDeploymentRequest.md +docs/CreateCServeDeploymentResponse.md +docs/CreateCServeV2DeploymentRequest.md +docs/CreateCServeV2DeploymentResponse.md +docs/CreateCheckoutRequest.md +docs/CreateCheckoutResponse.md +docs/CreateComputeDeploymentRequest.md +docs/CreateComputeDeploymentResponse.md +docs/CreateInferenceDeploymentRequest.md +docs/CreateInferenceDeploymentResponse.md +docs/CreateRagDeploymentRequest.md +docs/CreateRagDeploymentResponse.md +docs/CreditsResponse.md +docs/DailyBillResponse.md +docs/DeploymentStatus.md +docs/DeploymentStatusRequest.md +docs/DeploymentStatusResponse.md +docs/DeploymentType.md +docs/DeploymentUsageValue.md +docs/EXTERNALApi.md +docs/GetCServeDeploymentResponse.md +docs/GetCServeV2DeploymentResponse.md +docs/GetClusterResponse.md +docs/GetComputeDeploymentResponse.md +docs/GetDeploymentLogResponse.md +docs/GetDeploymentResponse.md +docs/GetDeploymentUsageResponse.md +docs/GetInferenceDeploymentResponse.md +docs/GetPaymentsResponse.md +docs/GetRagDeploymentResponse.md +docs/HTTPValidationError.md +docs/HardwareInstanceResponse.md +docs/ListAPIKeyResponse.md +docs/ListCServeRecipeResponse.md +docs/ListDailyBillResponse.md +docs/ListGetClusterResponse.md +docs/ListGetDeploymentResponse.md +docs/ListHardwareInstanceResponse.md +docs/ListPrebuiltImageResponse.md +docs/ListUserVaultItemsResponse.md +docs/Metric.md +docs/PrebuiltImageResponse.md +docs/ServiceStatus.md +docs/UserSupportEmailRequest.md +docs/UserVaultItemInput.md +docs/UserVaultItemOutput.md +docs/UserVaultType.md +docs/ValidationError.md +docs/ValidationErrorLocInner.md +git_push.sh +platform_api_python_client/__init__.py +platform_api_python_client/api/__init__.py +platform_api_python_client/api/external_api.py +platform_api_python_client/api_client.py +platform_api_python_client/api_response.py +platform_api_python_client/configuration.py +platform_api_python_client/exceptions.py +platform_api_python_client/models/__init__.py +platform_api_python_client/models/api_key_request.py +platform_api_python_client/models/api_key_response.py +platform_api_python_client/models/c_serve_recipe.py +platform_api_python_client/models/c_serve_recipe_perf.py +platform_api_python_client/models/c_serve_recipe_response.py +platform_api_python_client/models/c_serve_v2_recipe_input.py +platform_api_python_client/models/c_serve_v2_recipe_output.py +platform_api_python_client/models/create_c_serve_deployment_request.py +platform_api_python_client/models/create_c_serve_deployment_response.py +platform_api_python_client/models/create_c_serve_v2_deployment_request.py +platform_api_python_client/models/create_c_serve_v2_deployment_response.py +platform_api_python_client/models/create_checkout_request.py +platform_api_python_client/models/create_checkout_response.py +platform_api_python_client/models/create_compute_deployment_request.py +platform_api_python_client/models/create_compute_deployment_response.py +platform_api_python_client/models/create_inference_deployment_request.py +platform_api_python_client/models/create_inference_deployment_response.py +platform_api_python_client/models/create_rag_deployment_request.py +platform_api_python_client/models/create_rag_deployment_response.py +platform_api_python_client/models/credits_response.py +platform_api_python_client/models/daily_bill_response.py +platform_api_python_client/models/deployment_status.py +platform_api_python_client/models/deployment_status_request.py +platform_api_python_client/models/deployment_status_response.py +platform_api_python_client/models/deployment_type.py +platform_api_python_client/models/deployment_usage_value.py +platform_api_python_client/models/get_c_serve_deployment_response.py +platform_api_python_client/models/get_c_serve_v2_deployment_response.py +platform_api_python_client/models/get_cluster_response.py +platform_api_python_client/models/get_compute_deployment_response.py +platform_api_python_client/models/get_deployment_log_response.py +platform_api_python_client/models/get_deployment_response.py +platform_api_python_client/models/get_deployment_usage_response.py +platform_api_python_client/models/get_inference_deployment_response.py +platform_api_python_client/models/get_payments_response.py +platform_api_python_client/models/get_rag_deployment_response.py +platform_api_python_client/models/hardware_instance_response.py +platform_api_python_client/models/http_validation_error.py +platform_api_python_client/models/list_api_key_response.py +platform_api_python_client/models/list_c_serve_recipe_response.py +platform_api_python_client/models/list_daily_bill_response.py +platform_api_python_client/models/list_get_cluster_response.py +platform_api_python_client/models/list_get_deployment_response.py +platform_api_python_client/models/list_hardware_instance_response.py +platform_api_python_client/models/list_prebuilt_image_response.py +platform_api_python_client/models/list_user_vault_items_response.py +platform_api_python_client/models/metric.py +platform_api_python_client/models/prebuilt_image_response.py +platform_api_python_client/models/service_status.py +platform_api_python_client/models/user_support_email_request.py +platform_api_python_client/models/user_vault_item_input.py +platform_api_python_client/models/user_vault_item_output.py +platform_api_python_client/models/user_vault_type.py +platform_api_python_client/models/validation_error.py +platform_api_python_client/models/validation_error_loc_inner.py +platform_api_python_client/py.typed +platform_api_python_client/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +tox.ini diff --git a/platform_api_python_client/.openapi-generator/VERSION b/platform_api_python_client/.openapi-generator/VERSION new file mode 100644 index 0000000..4bc5d61 --- /dev/null +++ b/platform_api_python_client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.9.0 diff --git a/platform_api_python_client/.travis.yml b/platform_api_python_client/.travis.yml new file mode 100644 index 0000000..3ab8a2a --- /dev/null +++ b/platform_api_python_client/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + # uncomment the following if needed + #- "3.12-dev" # 3.12 development branch + #- "nightly" # nightly build +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=platform_api_python_client diff --git a/platform_api_python_client/README.md b/platform_api_python_client/README.md new file mode 100644 index 0000000..aa0d64a --- /dev/null +++ b/platform_api_python_client/README.md @@ -0,0 +1,204 @@ +# platform-api-python-client +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.1.0 +- Package version: 1.0.0 +- Generator version: 7.9.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 3.7+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/centml/platform/client.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/centml/platform/client.git`) + +Then import the package: +```python +import platform_api_python_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import platform_api_python_client +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import platform_api_python_client +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + user_support_email_request = platform_api_python_client.UserSupportEmailRequest() # UserSupportEmailRequest | + + try: + # Add User Request + api_response = api_instance.add_user_request_support_user_requests_post(user_support_email_request) + print("The response of EXTERNALApi->add_user_request_support_user_requests_post:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling EXTERNALApi->add_user_request_support_user_requests_post: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*EXTERNALApi* | [**add_user_request_support_user_requests_post**](docs/EXTERNALApi.md#add_user_request_support_user_requests_post) | **POST** /support/user-requests | Add User Request +*EXTERNALApi* | [**create_api_key_credentials_api_key_post**](docs/EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key +*EXTERNALApi* | [**create_checkout_payments_checkout_post**](docs/EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout +*EXTERNALApi* | [**create_compute_deployment_deployments_compute_post**](docs/EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment +*EXTERNALApi* | [**create_cserve_deployment_deployments_cserve_post**](docs/EXTERNALApi.md#create_cserve_deployment_deployments_cserve_post) | **POST** /deployments/cserve | Create Cserve Deployment +*EXTERNALApi* | [**create_cserve_v2_deployment_deployments_cserve_v2_post**](docs/EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment +*EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +*EXTERNALApi* | [**create_rag_deployment_deployments_rag_post**](docs/EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment +*EXTERNALApi* | [**delete_api_key_credentials_api_key_id_delete**](docs/EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key +*EXTERNALApi* | [**delete_user_vault_item_endpoint_user_vault_delete**](docs/EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint +*EXTERNALApi* | [**get_all_user_vault_items_endpoint_user_vault_get**](docs/EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint +*EXTERNALApi* | [**get_api_keys_credentials_api_key_get**](docs/EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys +*EXTERNALApi* | [**get_clusters_clusters_get**](docs/EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters +*EXTERNALApi* | [**get_compute_deployment_deployments_compute_deployment_id_get**](docs/EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment +*EXTERNALApi* | [**get_credits_credits_get**](docs/EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits +*EXTERNALApi* | [**get_cserve_deployment_deployments_cserve_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_deployment_deployments_cserve_deployment_id_get) | **GET** /deployments/cserve/{deployment_id} | Get Cserve Deployment +*EXTERNALApi* | [**get_cserve_recipe_deployments_cserve_recipes_get**](docs/EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe +*EXTERNALApi* | [**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment +*EXTERNALApi* | [**get_deployment_logs_deployments_logs_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs +*EXTERNALApi* | [**get_deployment_status_deployments_status_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_status_deployments_status_deployment_id_get) | **GET** /deployments/status/{deployment_id} | Get Deployment Status +*EXTERNALApi* | [**get_deployments_deployments_get**](docs/EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments +*EXTERNALApi* | [**get_hardware_instances_hardware_instances_get**](docs/EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances +*EXTERNALApi* | [**get_inference_deployment_deployments_inference_deployment_id_get**](docs/EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment +*EXTERNALApi* | [**get_payments_payments_get**](docs/EXTERNALApi.md#get_payments_payments_get) | **GET** /payments | Get Payments +*EXTERNALApi* | [**get_prebuilt_images_prebuilt_images_get**](docs/EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images +*EXTERNALApi* | [**get_rag_deployment_deployments_rag_deployment_id_get**](docs/EXTERNALApi.md#get_rag_deployment_deployments_rag_deployment_id_get) | **GET** /deployments/rag/{deployment_id} | Get Rag Deployment +*EXTERNALApi* | [**get_usage_daily_bills_get**](docs/EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage +*EXTERNALApi* | [**get_usage_deployments_usage_deployment_id_get**](docs/EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage +*EXTERNALApi* | [**setup_stripe_customer_payments_setup_post**](docs/EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer +*EXTERNALApi* | [**update_deployment_status_deployments_status_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status +*EXTERNALApi* | [**update_user_vault_item_endpoint_user_vault_put**](docs/EXTERNALApi.md#update_user_vault_item_endpoint_user_vault_put) | **PUT** /user_vault | Update User Vault Item Endpoint + + +## Documentation For Models + + - [APIKeyRequest](docs/APIKeyRequest.md) + - [APIKeyResponse](docs/APIKeyResponse.md) + - [CServeRecipe](docs/CServeRecipe.md) + - [CServeRecipePerf](docs/CServeRecipePerf.md) + - [CServeRecipeResponse](docs/CServeRecipeResponse.md) + - [CServeV2RecipeInput](docs/CServeV2RecipeInput.md) + - [CServeV2RecipeOutput](docs/CServeV2RecipeOutput.md) + - [CreateCServeDeploymentRequest](docs/CreateCServeDeploymentRequest.md) + - [CreateCServeDeploymentResponse](docs/CreateCServeDeploymentResponse.md) + - [CreateCServeV2DeploymentRequest](docs/CreateCServeV2DeploymentRequest.md) + - [CreateCServeV2DeploymentResponse](docs/CreateCServeV2DeploymentResponse.md) + - [CreateCheckoutRequest](docs/CreateCheckoutRequest.md) + - [CreateCheckoutResponse](docs/CreateCheckoutResponse.md) + - [CreateComputeDeploymentRequest](docs/CreateComputeDeploymentRequest.md) + - [CreateComputeDeploymentResponse](docs/CreateComputeDeploymentResponse.md) + - [CreateInferenceDeploymentRequest](docs/CreateInferenceDeploymentRequest.md) + - [CreateInferenceDeploymentResponse](docs/CreateInferenceDeploymentResponse.md) + - [CreateRagDeploymentRequest](docs/CreateRagDeploymentRequest.md) + - [CreateRagDeploymentResponse](docs/CreateRagDeploymentResponse.md) + - [CreditsResponse](docs/CreditsResponse.md) + - [DailyBillResponse](docs/DailyBillResponse.md) + - [DeploymentStatus](docs/DeploymentStatus.md) + - [DeploymentStatusRequest](docs/DeploymentStatusRequest.md) + - [DeploymentStatusResponse](docs/DeploymentStatusResponse.md) + - [DeploymentType](docs/DeploymentType.md) + - [DeploymentUsageValue](docs/DeploymentUsageValue.md) + - [GetCServeDeploymentResponse](docs/GetCServeDeploymentResponse.md) + - [GetCServeV2DeploymentResponse](docs/GetCServeV2DeploymentResponse.md) + - [GetClusterResponse](docs/GetClusterResponse.md) + - [GetComputeDeploymentResponse](docs/GetComputeDeploymentResponse.md) + - [GetDeploymentLogResponse](docs/GetDeploymentLogResponse.md) + - [GetDeploymentResponse](docs/GetDeploymentResponse.md) + - [GetDeploymentUsageResponse](docs/GetDeploymentUsageResponse.md) + - [GetInferenceDeploymentResponse](docs/GetInferenceDeploymentResponse.md) + - [GetPaymentsResponse](docs/GetPaymentsResponse.md) + - [GetRagDeploymentResponse](docs/GetRagDeploymentResponse.md) + - [HTTPValidationError](docs/HTTPValidationError.md) + - [HardwareInstanceResponse](docs/HardwareInstanceResponse.md) + - [ListAPIKeyResponse](docs/ListAPIKeyResponse.md) + - [ListCServeRecipeResponse](docs/ListCServeRecipeResponse.md) + - [ListDailyBillResponse](docs/ListDailyBillResponse.md) + - [ListGetClusterResponse](docs/ListGetClusterResponse.md) + - [ListGetDeploymentResponse](docs/ListGetDeploymentResponse.md) + - [ListHardwareInstanceResponse](docs/ListHardwareInstanceResponse.md) + - [ListPrebuiltImageResponse](docs/ListPrebuiltImageResponse.md) + - [ListUserVaultItemsResponse](docs/ListUserVaultItemsResponse.md) + - [Metric](docs/Metric.md) + - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) + - [ServiceStatus](docs/ServiceStatus.md) + - [UserSupportEmailRequest](docs/UserSupportEmailRequest.md) + - [UserVaultItemInput](docs/UserVaultItemInput.md) + - [UserVaultItemOutput](docs/UserVaultItemOutput.md) + - [UserVaultType](docs/UserVaultType.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### HTTPBearer + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/platform_api_python_client/docs/APIKeyRequest.md b/platform_api_python_client/docs/APIKeyRequest.md new file mode 100644 index 0000000..30fac6c --- /dev/null +++ b/platform_api_python_client/docs/APIKeyRequest.md @@ -0,0 +1,29 @@ +# APIKeyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from platform_api_python_client.models.api_key_request import APIKeyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of APIKeyRequest from a JSON string +api_key_request_instance = APIKeyRequest.from_json(json) +# print the JSON string representation of the object +print(APIKeyRequest.to_json()) + +# convert the object into a dict +api_key_request_dict = api_key_request_instance.to_dict() +# create an instance of APIKeyRequest from a dict +api_key_request_from_dict = APIKeyRequest.from_dict(api_key_request_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/platform_api_python_client/docs/APIKeyResponse.md b/platform_api_python_client/docs/APIKeyResponse.md new file mode 100644 index 0000000..53df35e --- /dev/null +++ b/platform_api_python_client/docs/APIKeyResponse.md @@ -0,0 +1,31 @@ +# APIKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**id** | **str** | | +**created_at** | **datetime** | | + +## Example + +```python +from platform_api_python_client.models.api_key_response import APIKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of APIKeyResponse from a JSON string +api_key_response_instance = APIKeyResponse.from_json(json) +# print the JSON string representation of the object +print(APIKeyResponse.to_json()) + +# convert the object into a dict +api_key_response_dict = api_key_response_instance.to_dict() +# create an instance of APIKeyResponse from a dict +api_key_response_from_dict = APIKeyResponse.from_dict(api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CServeRecipe.md b/platform_api_python_client/docs/CServeRecipe.md new file mode 100644 index 0000000..9678dcc --- /dev/null +++ b/platform_api_python_client/docs/CServeRecipe.md @@ -0,0 +1,53 @@ +# CServeRecipe + +Base class for deployment planner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**is_embedding_model** | **bool** | | [optional] [default to False] +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**block_size** | **int** | | [optional] [default to 32] +**swap_space** | **int** | | [optional] [default to 0] +**gpu_mem_util** | **float** | | [optional] [default to 0.95] +**max_num_seqs** | **int** | | [optional] [default to 256] +**offloading_num** | **int** | | [optional] [default to 0] +**use_prefix_caching** | **bool** | | [optional] +**use_chunked_prefill** | **bool** | | [optional] +**chunked_prefill_size** | **int** | | [optional] +**eager_execution** | **bool** | | [optional] +**num_scheduler_steps** | **int** | | [optional] +**use_flashinfer** | **bool** | | [optional] [default to False] +**max_model_len** | **int** | | [optional] +**dtype** | **str** | | [optional] [default to 'auto'] +**tokenizer** | **str** | | [optional] +**spec_proposer** | **str** | | [optional] +**spec_draft_model** | **str** | | [optional] +**spec_tokens** | **int** | | [optional] +**spec_prompt_lookup_min** | **int** | | [optional] +**spec_prompt_lookup_max** | **int** | | [optional] +**seed** | **int** | | [optional] [default to 0] + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe import CServeRecipe + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipe from a JSON string +c_serve_recipe_instance = CServeRecipe.from_json(json) +# print the JSON string representation of the object +print(CServeRecipe.to_json()) + +# convert the object into a dict +c_serve_recipe_dict = c_serve_recipe_instance.to_dict() +# create an instance of CServeRecipe from a dict +c_serve_recipe_from_dict = CServeRecipe.from_dict(c_serve_recipe_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/platform_api_python_client/docs/CServeRecipePerf.md b/platform_api_python_client/docs/CServeRecipePerf.md new file mode 100644 index 0000000..09a0ab7 --- /dev/null +++ b/platform_api_python_client/docs/CServeRecipePerf.md @@ -0,0 +1,32 @@ +# CServeRecipePerf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**hardware_instance_id** | **int** | | +**output_tp** | **List[List[object]]** | | +**mean_ttft** | **List[List[object]]** | | + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipePerf from a JSON string +c_serve_recipe_perf_instance = CServeRecipePerf.from_json(json) +# print the JSON string representation of the object +print(CServeRecipePerf.to_json()) + +# convert the object into a dict +c_serve_recipe_perf_dict = c_serve_recipe_perf_instance.to_dict() +# create an instance of CServeRecipePerf from a dict +c_serve_recipe_perf_from_dict = CServeRecipePerf.from_dict(c_serve_recipe_perf_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/platform_api_python_client/docs/CServeRecipeResponse.md b/platform_api_python_client/docs/CServeRecipeResponse.md new file mode 100644 index 0000000..4a42fda --- /dev/null +++ b/platform_api_python_client/docs/CServeRecipeResponse.md @@ -0,0 +1,33 @@ +# CServeRecipeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**cluster_id** | **int** | | +**fastest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | +**cheapest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | +**best_value** | [**CServeRecipePerf**](CServeRecipePerf.md) | | + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipeResponse from a JSON string +c_serve_recipe_response_instance = CServeRecipeResponse.from_json(json) +# print the JSON string representation of the object +print(CServeRecipeResponse.to_json()) + +# convert the object into a dict +c_serve_recipe_response_dict = c_serve_recipe_response_instance.to_dict() +# create an instance of CServeRecipeResponse from a dict +c_serve_recipe_response_from_dict = CServeRecipeResponse.from_dict(c_serve_recipe_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CServeV2Recipe.md b/platform_api_python_client/docs/CServeV2Recipe.md new file mode 100644 index 0000000..4d8ba68 --- /dev/null +++ b/platform_api_python_client/docs/CServeV2Recipe.md @@ -0,0 +1,57 @@ +# CServeV2Recipe + +Inputs to start deployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**max_model_len** | **int** | | +**is_embedding_model** | **bool** | | [default to False] +**tokenizer** | **str** | | +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**gpu_mem_util** | **float** | | [default to 0.95] +**block_size** | **int** | | [default to 32] +**swap_space** | **int** | | [default to 0] +**quantization** | **str** | | +**dtype** | **str** | | [default to 'auto'] +**cache_dtype** | **str** | | [default to 'auto'] +**max_num_seqs** | **int** | | [default to 256] +**eager_execution** | **bool** | | [default to True] +**use_flashinfer** | **bool** | | [default to False] +**offloading_num** | **float** | | [default to 0] +**spec_draft_model** | **str** | | +**spec_tokens** | **int** | | +**spec_prompt_lookup_max** | **int** | | +**spec_prompt_lookup_min** | **int** | | +**use_prefix_caching** | **bool** | | [default to False] +**use_chunked_prefill** | **bool** | | [default to False] +**chunked_prefill_size** | **int** | | +**max_seq_len_to_capture** | **int** | | [default to 1024] +**distributed_executor_backend** | **str** | | [default to 'ray'] +**spec_max_batch_size** | **int** | | +**spec_max_seq_len** | **int** | | +**num_scheduler_steps** | **int** | | [default to 1] + +## Example + +```python +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeV2Recipe from a JSON string +c_serve_v2_recipe_instance = CServeV2Recipe.from_json(json) +# print the JSON string representation of the object +print(CServeV2Recipe.to_json()) + +# convert the object into a dict +c_serve_v2_recipe_dict = c_serve_v2_recipe_instance.to_dict() +# create an instance of CServeV2Recipe from a dict +c_serve_v2_recipe_from_dict = CServeV2Recipe.from_dict(c_serve_v2_recipe_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/platform_api_python_client/docs/CServeV2RecipeInput.md b/platform_api_python_client/docs/CServeV2RecipeInput.md new file mode 100644 index 0000000..1d9a27f --- /dev/null +++ b/platform_api_python_client/docs/CServeV2RecipeInput.md @@ -0,0 +1,57 @@ +# CServeV2RecipeInput + +Inputs to start deployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**max_model_len** | **int** | | [optional] +**is_embedding_model** | **bool** | | [optional] [default to False] +**tokenizer** | **str** | | +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**gpu_mem_util** | **float** | | [optional] [default to 0.95] +**block_size** | **int** | | [optional] [default to 16] +**swap_space** | **int** | | [optional] [default to 0] +**quantization** | **str** | | [optional] +**dtype** | **str** | | [optional] [default to 'auto'] +**cache_dtype** | **str** | | [optional] [default to 'auto'] +**max_num_seqs** | **int** | | [optional] [default to 256] +**eager_execution** | **bool** | | [optional] [default to True] +**use_flashinfer** | **bool** | | [optional] [default to False] +**offloading_num** | **float** | | [optional] [default to 0] +**spec_draft_model** | **str** | | [optional] +**spec_tokens** | **int** | | [optional] +**spec_prompt_lookup_max** | **int** | | [optional] +**spec_prompt_lookup_min** | **int** | | [optional] +**use_prefix_caching** | **bool** | | [optional] [default to False] +**use_chunked_prefill** | **bool** | | [optional] [default to False] +**chunked_prefill_size** | **int** | | [optional] +**max_seq_len_to_capture** | **int** | | [optional] [default to 8192] +**distributed_executor_backend** | **str** | | [optional] [default to 'mp'] +**spec_max_batch_size** | **int** | | [optional] +**spec_max_seq_len** | **int** | | [optional] +**num_scheduler_steps** | **int** | | [optional] [default to 1] + +## Example + +```python +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeV2RecipeInput from a JSON string +c_serve_v2_recipe_input_instance = CServeV2RecipeInput.from_json(json) +# print the JSON string representation of the object +print(CServeV2RecipeInput.to_json()) + +# convert the object into a dict +c_serve_v2_recipe_input_dict = c_serve_v2_recipe_input_instance.to_dict() +# create an instance of CServeV2RecipeInput from a dict +c_serve_v2_recipe_input_from_dict = CServeV2RecipeInput.from_dict(c_serve_v2_recipe_input_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/platform_api_python_client/docs/CServeV2RecipeOutput.md b/platform_api_python_client/docs/CServeV2RecipeOutput.md new file mode 100644 index 0000000..437fbfc --- /dev/null +++ b/platform_api_python_client/docs/CServeV2RecipeOutput.md @@ -0,0 +1,57 @@ +# CServeV2RecipeOutput + +Inputs to start deployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**max_model_len** | **int** | | +**is_embedding_model** | **bool** | | [default to False] +**tokenizer** | **str** | | +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**gpu_mem_util** | **float** | | [default to 0.95] +**block_size** | **int** | | [default to 16] +**swap_space** | **int** | | [default to 0] +**quantization** | **str** | | +**dtype** | **str** | | [default to 'auto'] +**cache_dtype** | **str** | | [default to 'auto'] +**max_num_seqs** | **int** | | [default to 256] +**eager_execution** | **bool** | | [default to True] +**use_flashinfer** | **bool** | | [default to False] +**offloading_num** | **float** | | [default to 0] +**spec_draft_model** | **str** | | +**spec_tokens** | **int** | | +**spec_prompt_lookup_max** | **int** | | +**spec_prompt_lookup_min** | **int** | | +**use_prefix_caching** | **bool** | | [default to False] +**use_chunked_prefill** | **bool** | | [default to False] +**chunked_prefill_size** | **int** | | +**max_seq_len_to_capture** | **int** | | [default to 8192] +**distributed_executor_backend** | **str** | | [default to 'mp'] +**spec_max_batch_size** | **int** | | +**spec_max_seq_len** | **int** | | +**num_scheduler_steps** | **int** | | [default to 1] + +## Example + +```python +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeV2RecipeOutput from a JSON string +c_serve_v2_recipe_output_instance = CServeV2RecipeOutput.from_json(json) +# print the JSON string representation of the object +print(CServeV2RecipeOutput.to_json()) + +# convert the object into a dict +c_serve_v2_recipe_output_dict = c_serve_v2_recipe_output_instance.to_dict() +# create an instance of CServeV2RecipeOutput from a dict +c_serve_v2_recipe_output_from_dict = CServeV2RecipeOutput.from_dict(c_serve_v2_recipe_output_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/platform_api_python_client/docs/CreateCServeDeploymentRequest.md b/platform_api_python_client/docs/CreateCServeDeploymentRequest.md new file mode 100644 index 0000000..ae0f73e --- /dev/null +++ b/platform_api_python_client/docs/CreateCServeDeploymentRequest.md @@ -0,0 +1,38 @@ +# CreateCServeDeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeRecipe**](CServeRecipe.md) | | +**hf_token** | **str** | | [optional] +**endpoint_certificate_authority** | **str** | | [optional] +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeDeploymentRequest from a JSON string +create_c_serve_deployment_request_instance = CreateCServeDeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateCServeDeploymentRequest.to_json()) + +# convert the object into a dict +create_c_serve_deployment_request_dict = create_c_serve_deployment_request_instance.to_dict() +# create an instance of CreateCServeDeploymentRequest from a dict +create_c_serve_deployment_request_from_dict = CreateCServeDeploymentRequest.from_dict(create_c_serve_deployment_request_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/platform_api_python_client/docs/CreateCServeDeploymentResponse.md b/platform_api_python_client/docs/CreateCServeDeploymentResponse.md new file mode 100644 index 0000000..4d5de2e --- /dev/null +++ b/platform_api_python_client/docs/CreateCServeDeploymentResponse.md @@ -0,0 +1,31 @@ +# CreateCServeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeDeploymentResponse from a JSON string +create_c_serve_deployment_response_instance = CreateCServeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateCServeDeploymentResponse.to_json()) + +# convert the object into a dict +create_c_serve_deployment_response_dict = create_c_serve_deployment_response_instance.to_dict() +# create an instance of CreateCServeDeploymentResponse from a dict +create_c_serve_deployment_response_from_dict = CreateCServeDeploymentResponse.from_dict(create_c_serve_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreateCServeV2DeploymentRequest.md b/platform_api_python_client/docs/CreateCServeV2DeploymentRequest.md new file mode 100644 index 0000000..f2b8766 --- /dev/null +++ b/platform_api_python_client/docs/CreateCServeV2DeploymentRequest.md @@ -0,0 +1,38 @@ +# CreateCServeV2DeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeV2RecipeInput**](CServeV2RecipeInput.md) | | +**hf_token** | **str** | | [optional] +**endpoint_certificate_authority** | **str** | | [optional] +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeV2DeploymentRequest from a JSON string +create_c_serve_v2_deployment_request_instance = CreateCServeV2DeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateCServeV2DeploymentRequest.to_json()) + +# convert the object into a dict +create_c_serve_v2_deployment_request_dict = create_c_serve_v2_deployment_request_instance.to_dict() +# create an instance of CreateCServeV2DeploymentRequest from a dict +create_c_serve_v2_deployment_request_from_dict = CreateCServeV2DeploymentRequest.from_dict(create_c_serve_v2_deployment_request_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/platform_api_python_client/docs/CreateCServeV2DeploymentResponse.md b/platform_api_python_client/docs/CreateCServeV2DeploymentResponse.md new file mode 100644 index 0000000..86facfc --- /dev/null +++ b/platform_api_python_client/docs/CreateCServeV2DeploymentResponse.md @@ -0,0 +1,31 @@ +# CreateCServeV2DeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeV2DeploymentResponse from a JSON string +create_c_serve_v2_deployment_response_instance = CreateCServeV2DeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateCServeV2DeploymentResponse.to_json()) + +# convert the object into a dict +create_c_serve_v2_deployment_response_dict = create_c_serve_v2_deployment_response_instance.to_dict() +# create an instance of CreateCServeV2DeploymentResponse from a dict +create_c_serve_v2_deployment_response_from_dict = CreateCServeV2DeploymentResponse.from_dict(create_c_serve_v2_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreateCheckoutRequest.md b/platform_api_python_client/docs/CreateCheckoutRequest.md new file mode 100644 index 0000000..90cddcf --- /dev/null +++ b/platform_api_python_client/docs/CreateCheckoutRequest.md @@ -0,0 +1,30 @@ +# CreateCheckoutRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_credits** | **int** | | +**success_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCheckoutRequest from a JSON string +create_checkout_request_instance = CreateCheckoutRequest.from_json(json) +# print the JSON string representation of the object +print(CreateCheckoutRequest.to_json()) + +# convert the object into a dict +create_checkout_request_dict = create_checkout_request_instance.to_dict() +# create an instance of CreateCheckoutRequest from a dict +create_checkout_request_from_dict = CreateCheckoutRequest.from_dict(create_checkout_request_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/platform_api_python_client/docs/CreateCheckoutResponse.md b/platform_api_python_client/docs/CreateCheckoutResponse.md new file mode 100644 index 0000000..514af5e --- /dev/null +++ b/platform_api_python_client/docs/CreateCheckoutResponse.md @@ -0,0 +1,29 @@ +# CreateCheckoutResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCheckoutResponse from a JSON string +create_checkout_response_instance = CreateCheckoutResponse.from_json(json) +# print the JSON string representation of the object +print(CreateCheckoutResponse.to_json()) + +# convert the object into a dict +create_checkout_response_dict = create_checkout_response_instance.to_dict() +# create an instance of CreateCheckoutResponse from a dict +create_checkout_response_from_dict = CreateCheckoutResponse.from_dict(create_checkout_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreateComputeDeploymentRequest.md b/platform_api_python_client/docs/CreateComputeDeploymentRequest.md new file mode 100644 index 0000000..7abef60 --- /dev/null +++ b/platform_api_python_client/docs/CreateComputeDeploymentRequest.md @@ -0,0 +1,35 @@ +# CreateComputeDeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**image_url** | **str** | | +**enable_jupyter** | **bool** | | [optional] [default to False] +**ssh_public_key** | **str** | | [optional] +**ssh_password** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateComputeDeploymentRequest from a JSON string +create_compute_deployment_request_instance = CreateComputeDeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateComputeDeploymentRequest.to_json()) + +# convert the object into a dict +create_compute_deployment_request_dict = create_compute_deployment_request_instance.to_dict() +# create an instance of CreateComputeDeploymentRequest from a dict +create_compute_deployment_request_from_dict = CreateComputeDeploymentRequest.from_dict(create_compute_deployment_request_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/platform_api_python_client/docs/CreateComputeDeploymentResponse.md b/platform_api_python_client/docs/CreateComputeDeploymentResponse.md new file mode 100644 index 0000000..e1ea3b5 --- /dev/null +++ b/platform_api_python_client/docs/CreateComputeDeploymentResponse.md @@ -0,0 +1,33 @@ +# CreateComputeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | +**port** | **int** | | +**jupyter_token** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateComputeDeploymentResponse from a JSON string +create_compute_deployment_response_instance = CreateComputeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateComputeDeploymentResponse.to_json()) + +# convert the object into a dict +create_compute_deployment_response_dict = create_compute_deployment_response_instance.to_dict() +# create an instance of CreateComputeDeploymentResponse from a dict +create_compute_deployment_response_from_dict = CreateComputeDeploymentResponse.from_dict(create_compute_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreateInferenceDeploymentRequest.md b/platform_api_python_client/docs/CreateInferenceDeploymentRequest.md new file mode 100644 index 0000000..d3bec7e --- /dev/null +++ b/platform_api_python_client/docs/CreateInferenceDeploymentRequest.md @@ -0,0 +1,41 @@ +# CreateInferenceDeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**image_url** | **str** | | +**port** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | [optional] +**healthcheck** | **str** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] +**command** | **List[str]** | | [optional] +**command_args** | **List[str]** | | [optional] +**endpoint_certificate_authority** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInferenceDeploymentRequest from a JSON string +create_inference_deployment_request_instance = CreateInferenceDeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateInferenceDeploymentRequest.to_json()) + +# convert the object into a dict +create_inference_deployment_request_dict = create_inference_deployment_request_instance.to_dict() +# create an instance of CreateInferenceDeploymentRequest from a dict +create_inference_deployment_request_from_dict = CreateInferenceDeploymentRequest.from_dict(create_inference_deployment_request_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/platform_api_python_client/docs/CreateInferenceDeploymentResponse.md b/platform_api_python_client/docs/CreateInferenceDeploymentResponse.md new file mode 100644 index 0000000..54fcc6b --- /dev/null +++ b/platform_api_python_client/docs/CreateInferenceDeploymentResponse.md @@ -0,0 +1,31 @@ +# CreateInferenceDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInferenceDeploymentResponse from a JSON string +create_inference_deployment_response_instance = CreateInferenceDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateInferenceDeploymentResponse.to_json()) + +# convert the object into a dict +create_inference_deployment_response_dict = create_inference_deployment_response_instance.to_dict() +# create an instance of CreateInferenceDeploymentResponse from a dict +create_inference_deployment_response_from_dict = CreateInferenceDeploymentResponse.from_dict(create_inference_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreateRagDeploymentRequest.md b/platform_api_python_client/docs/CreateRagDeploymentRequest.md new file mode 100644 index 0000000..1bada89 --- /dev/null +++ b/platform_api_python_client/docs/CreateRagDeploymentRequest.md @@ -0,0 +1,39 @@ +# CreateRagDeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeV2RecipeInput**](CServeV2RecipeInput.md) | | +**hf_token** | **str** | | [optional] +**centml_api_key** | **str** | | +**min_scale** | **int** | | [optional] [default to 1] +**max_scale** | **int** | | [optional] [default to 1] +**endpoint_certificate_authority** | **str** | | [optional] +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRagDeploymentRequest from a JSON string +create_rag_deployment_request_instance = CreateRagDeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateRagDeploymentRequest.to_json()) + +# convert the object into a dict +create_rag_deployment_request_dict = create_rag_deployment_request_instance.to_dict() +# create an instance of CreateRagDeploymentRequest from a dict +create_rag_deployment_request_from_dict = CreateRagDeploymentRequest.from_dict(create_rag_deployment_request_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/platform_api_python_client/docs/CreateRagDeploymentResponse.md b/platform_api_python_client/docs/CreateRagDeploymentResponse.md new file mode 100644 index 0000000..33e88fd --- /dev/null +++ b/platform_api_python_client/docs/CreateRagDeploymentResponse.md @@ -0,0 +1,31 @@ +# CreateRagDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRagDeploymentResponse from a JSON string +create_rag_deployment_response_instance = CreateRagDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateRagDeploymentResponse.to_json()) + +# convert the object into a dict +create_rag_deployment_response_dict = create_rag_deployment_response_instance.to_dict() +# create an instance of CreateRagDeploymentResponse from a dict +create_rag_deployment_response_from_dict = CreateRagDeploymentResponse.from_dict(create_rag_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/CreditsResponse.md b/platform_api_python_client/docs/CreditsResponse.md new file mode 100644 index 0000000..7e13a51 --- /dev/null +++ b/platform_api_python_client/docs/CreditsResponse.md @@ -0,0 +1,29 @@ +# CreditsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credits** | **float** | | + +## Example + +```python +from platform_api_python_client.models.credits_response import CreditsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreditsResponse from a JSON string +credits_response_instance = CreditsResponse.from_json(json) +# print the JSON string representation of the object +print(CreditsResponse.to_json()) + +# convert the object into a dict +credits_response_dict = credits_response_instance.to_dict() +# create an instance of CreditsResponse from a dict +credits_response_from_dict = CreditsResponse.from_dict(credits_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/DailyBillResponse.md b/platform_api_python_client/docs/DailyBillResponse.md new file mode 100644 index 0000000..547c826 --- /dev/null +++ b/platform_api_python_client/docs/DailyBillResponse.md @@ -0,0 +1,30 @@ +# DailyBillResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **date** | | +**credits** | **float** | | + +## Example + +```python +from platform_api_python_client.models.daily_bill_response import DailyBillResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DailyBillResponse from a JSON string +daily_bill_response_instance = DailyBillResponse.from_json(json) +# print the JSON string representation of the object +print(DailyBillResponse.to_json()) + +# convert the object into a dict +daily_bill_response_dict = daily_bill_response_instance.to_dict() +# create an instance of DailyBillResponse from a dict +daily_bill_response_from_dict = DailyBillResponse.from_dict(daily_bill_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/DeploymentStatus.md b/platform_api_python_client/docs/DeploymentStatus.md new file mode 100644 index 0000000..4ab4da9 --- /dev/null +++ b/platform_api_python_client/docs/DeploymentStatus.md @@ -0,0 +1,14 @@ +# DeploymentStatus + + +## Enum + +* `ACTIVE` (value: `'active'`) + +* `PAUSED` (value: `'paused'`) + +* `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/platform_api_python_client/docs/DeploymentStatusRequest.md b/platform_api_python_client/docs/DeploymentStatusRequest.md new file mode 100644 index 0000000..866a8db --- /dev/null +++ b/platform_api_python_client/docs/DeploymentStatusRequest.md @@ -0,0 +1,29 @@ +# DeploymentStatusRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | + +## Example + +```python +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentStatusRequest from a JSON string +deployment_status_request_instance = DeploymentStatusRequest.from_json(json) +# print the JSON string representation of the object +print(DeploymentStatusRequest.to_json()) + +# convert the object into a dict +deployment_status_request_dict = deployment_status_request_instance.to_dict() +# create an instance of DeploymentStatusRequest from a dict +deployment_status_request_from_dict = DeploymentStatusRequest.from_dict(deployment_status_request_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/platform_api_python_client/docs/DeploymentStatusResponse.md b/platform_api_python_client/docs/DeploymentStatusResponse.md new file mode 100644 index 0000000..e6f2239 --- /dev/null +++ b/platform_api_python_client/docs/DeploymentStatusResponse.md @@ -0,0 +1,34 @@ +# DeploymentStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**service_status** | [**ServiceStatus**](ServiceStatus.md) | | +**error_message** | **str** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentStatusResponse from a JSON string +deployment_status_response_instance = DeploymentStatusResponse.from_json(json) +# print the JSON string representation of the object +print(DeploymentStatusResponse.to_json()) + +# convert the object into a dict +deployment_status_response_dict = deployment_status_response_instance.to_dict() +# create an instance of DeploymentStatusResponse from a dict +deployment_status_response_from_dict = DeploymentStatusResponse.from_dict(deployment_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/DeploymentType.md b/platform_api_python_client/docs/DeploymentType.md new file mode 100644 index 0000000..b988793 --- /dev/null +++ b/platform_api_python_client/docs/DeploymentType.md @@ -0,0 +1,28 @@ +# DeploymentType + + +## Enum + +* `INFERENCE` (value: `'inference'`) + +* `TRAINING` (value: `'training'`) + +* `COMPUTE` (value: `'compute'`) + +* `COMPILATION` (value: `'compilation'`) + +* `INFERENCE_V2` (value: `'inference_v2'`) + +* `COMPUTE_V2` (value: `'compute_v2'`) + +* `CSERVE` (value: `'cserve'`) + +* `CSERVE_V2` (value: `'cserve_v2'`) + +* `DEPLOYMENT` (value: `'deployment'`) + +* `RAG` (value: `'rag'`) + +[[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/platform_api_python_client/docs/DeploymentUsageValue.md b/platform_api_python_client/docs/DeploymentUsageValue.md new file mode 100644 index 0000000..4916f19 --- /dev/null +++ b/platform_api_python_client/docs/DeploymentUsageValue.md @@ -0,0 +1,30 @@ +# DeploymentUsageValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | | +**value** | **float** | | + +## Example + +```python +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentUsageValue from a JSON string +deployment_usage_value_instance = DeploymentUsageValue.from_json(json) +# print the JSON string representation of the object +print(DeploymentUsageValue.to_json()) + +# convert the object into a dict +deployment_usage_value_dict = deployment_usage_value_instance.to_dict() +# create an instance of DeploymentUsageValue from a dict +deployment_usage_value_from_dict = DeploymentUsageValue.from_dict(deployment_usage_value_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/platform_api_python_client/docs/EXTERNALApi.md b/platform_api_python_client/docs/EXTERNALApi.md new file mode 100644 index 0000000..e1a6dc9 --- /dev/null +++ b/platform_api_python_client/docs/EXTERNALApi.md @@ -0,0 +1,2450 @@ +# platform_api_python_client.EXTERNALApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_user_request_support_user_requests_post**](EXTERNALApi.md#add_user_request_support_user_requests_post) | **POST** /support/user-requests | Add User Request +[**create_api_key_credentials_api_key_post**](EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key +[**create_checkout_payments_checkout_post**](EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout +[**create_compute_deployment_deployments_compute_post**](EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment +[**create_cserve_deployment_deployments_cserve_post**](EXTERNALApi.md#create_cserve_deployment_deployments_cserve_post) | **POST** /deployments/cserve | Create Cserve Deployment +[**create_cserve_v2_deployment_deployments_cserve_v2_post**](EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment +[**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +[**create_rag_deployment_deployments_rag_post**](EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment +[**delete_api_key_credentials_api_key_id_delete**](EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key +[**delete_user_vault_item_endpoint_user_vault_delete**](EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint +[**get_all_user_vault_items_endpoint_user_vault_get**](EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint +[**get_api_keys_credentials_api_key_get**](EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys +[**get_clusters_clusters_get**](EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters +[**get_compute_deployment_deployments_compute_deployment_id_get**](EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment +[**get_credits_credits_get**](EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits +[**get_cserve_deployment_deployments_cserve_deployment_id_get**](EXTERNALApi.md#get_cserve_deployment_deployments_cserve_deployment_id_get) | **GET** /deployments/cserve/{deployment_id} | Get Cserve Deployment +[**get_cserve_recipe_deployments_cserve_recipes_get**](EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe +[**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment +[**get_deployment_logs_deployments_logs_deployment_id_get**](EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs +[**get_deployment_status_deployments_status_deployment_id_get**](EXTERNALApi.md#get_deployment_status_deployments_status_deployment_id_get) | **GET** /deployments/status/{deployment_id} | Get Deployment Status +[**get_deployments_deployments_get**](EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments +[**get_hardware_instances_hardware_instances_get**](EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances +[**get_inference_deployment_deployments_inference_deployment_id_get**](EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment +[**get_payments_payments_get**](EXTERNALApi.md#get_payments_payments_get) | **GET** /payments | Get Payments +[**get_prebuilt_images_prebuilt_images_get**](EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images +[**get_rag_deployment_deployments_rag_deployment_id_get**](EXTERNALApi.md#get_rag_deployment_deployments_rag_deployment_id_get) | **GET** /deployments/rag/{deployment_id} | Get Rag Deployment +[**get_usage_daily_bills_get**](EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage +[**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage +[**setup_stripe_customer_payments_setup_post**](EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer +[**update_deployment_status_deployments_status_deployment_id_put**](EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status +[**update_user_vault_item_endpoint_user_vault_put**](EXTERNALApi.md#update_user_vault_item_endpoint_user_vault_put) | **PUT** /user_vault | Update User Vault Item Endpoint + + +# **add_user_request_support_user_requests_post** +> object add_user_request_support_user_requests_post(user_support_email_request) + +Add User Request + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + user_support_email_request = platform_api_python_client.UserSupportEmailRequest() # UserSupportEmailRequest | + + try: + # Add User Request + api_response = api_instance.add_user_request_support_user_requests_post(user_support_email_request) + print("The response of EXTERNALApi->add_user_request_support_user_requests_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->add_user_request_support_user_requests_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_support_email_request** | [**UserSupportEmailRequest**](UserSupportEmailRequest.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_api_key_credentials_api_key_post** +> APIKeyResponse create_api_key_credentials_api_key_post(api_key_request) + +Create Api Key + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + api_key_request = platform_api_python_client.APIKeyRequest() # APIKeyRequest | + + try: + # Create Api Key + api_response = api_instance.create_api_key_credentials_api_key_post(api_key_request) + print("The response of EXTERNALApi->create_api_key_credentials_api_key_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_api_key_credentials_api_key_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_key_request** | [**APIKeyRequest**](APIKeyRequest.md)| | + +### Return type + +[**APIKeyResponse**](APIKeyResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_checkout_payments_checkout_post** +> CreateCheckoutResponse create_checkout_payments_checkout_post(create_checkout_request) + +Create Checkout + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_checkout_request = platform_api_python_client.CreateCheckoutRequest() # CreateCheckoutRequest | + + try: + # Create Checkout + api_response = api_instance.create_checkout_payments_checkout_post(create_checkout_request) + print("The response of EXTERNALApi->create_checkout_payments_checkout_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_checkout_payments_checkout_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_checkout_request** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)| | + +### Return type + +[**CreateCheckoutResponse**](CreateCheckoutResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_compute_deployment_deployments_compute_post** +> CreateComputeDeploymentResponse create_compute_deployment_deployments_compute_post(create_compute_deployment_request) + +Create Compute Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_compute_deployment_request = platform_api_python_client.CreateComputeDeploymentRequest() # CreateComputeDeploymentRequest | + + try: + # Create Compute Deployment + api_response = api_instance.create_compute_deployment_deployments_compute_post(create_compute_deployment_request) + print("The response of EXTERNALApi->create_compute_deployment_deployments_compute_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_compute_deployment_deployments_compute_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_compute_deployment_request** | [**CreateComputeDeploymentRequest**](CreateComputeDeploymentRequest.md)| | + +### Return type + +[**CreateComputeDeploymentResponse**](CreateComputeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_cserve_deployment_deployments_cserve_post** +> CreateCServeDeploymentResponse create_cserve_deployment_deployments_cserve_post(create_c_serve_deployment_request) + +Create Cserve Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_c_serve_deployment_request = platform_api_python_client.CreateCServeDeploymentRequest() # CreateCServeDeploymentRequest | + + try: + # Create Cserve Deployment + api_response = api_instance.create_cserve_deployment_deployments_cserve_post(create_c_serve_deployment_request) + print("The response of EXTERNALApi->create_cserve_deployment_deployments_cserve_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_cserve_deployment_deployments_cserve_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_c_serve_deployment_request** | [**CreateCServeDeploymentRequest**](CreateCServeDeploymentRequest.md)| | + +### Return type + +[**CreateCServeDeploymentResponse**](CreateCServeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_cserve_v2_deployment_deployments_cserve_v2_post** +> CreateCServeV2DeploymentResponse create_cserve_v2_deployment_deployments_cserve_v2_post(create_c_serve_v2_deployment_request) + +Create Cserve V2 Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_c_serve_v2_deployment_request = platform_api_python_client.CreateCServeV2DeploymentRequest() # CreateCServeV2DeploymentRequest | + + try: + # Create Cserve V2 Deployment + api_response = api_instance.create_cserve_v2_deployment_deployments_cserve_v2_post(create_c_serve_v2_deployment_request) + print("The response of EXTERNALApi->create_cserve_v2_deployment_deployments_cserve_v2_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_cserve_v2_deployment_deployments_cserve_v2_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_c_serve_v2_deployment_request** | [**CreateCServeV2DeploymentRequest**](CreateCServeV2DeploymentRequest.md)| | + +### Return type + +[**CreateCServeV2DeploymentResponse**](CreateCServeV2DeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_inference_deployment_deployments_inference_post** +> CreateInferenceDeploymentResponse create_inference_deployment_deployments_inference_post(create_inference_deployment_request) + +Create Inference Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_inference_deployment_request = platform_api_python_client.CreateInferenceDeploymentRequest() # CreateInferenceDeploymentRequest | + + try: + # Create Inference Deployment + api_response = api_instance.create_inference_deployment_deployments_inference_post(create_inference_deployment_request) + print("The response of EXTERNALApi->create_inference_deployment_deployments_inference_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_inference_deployment_deployments_inference_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_inference_deployment_request** | [**CreateInferenceDeploymentRequest**](CreateInferenceDeploymentRequest.md)| | + +### Return type + +[**CreateInferenceDeploymentResponse**](CreateInferenceDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_rag_deployment_deployments_rag_post** +> CreateRagDeploymentResponse create_rag_deployment_deployments_rag_post(create_rag_deployment_request) + +Create Rag Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_rag_deployment_request = platform_api_python_client.CreateRagDeploymentRequest() # CreateRagDeploymentRequest | + + try: + # Create Rag Deployment + api_response = api_instance.create_rag_deployment_deployments_rag_post(create_rag_deployment_request) + print("The response of EXTERNALApi->create_rag_deployment_deployments_rag_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_rag_deployment_deployments_rag_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_rag_deployment_request** | [**CreateRagDeploymentRequest**](CreateRagDeploymentRequest.md)| | + +### Return type + +[**CreateRagDeploymentResponse**](CreateRagDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_api_key_credentials_api_key_id_delete** +> object delete_api_key_credentials_api_key_id_delete(id) + +Delete Api Key + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + id = 'id_example' # str | + + try: + # Delete Api Key + api_response = api_instance.delete_api_key_credentials_api_key_id_delete(id) + print("The response of EXTERNALApi->delete_api_key_credentials_api_key_id_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->delete_api_key_credentials_api_key_id_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_user_vault_item_endpoint_user_vault_delete** +> object delete_user_vault_item_endpoint_user_vault_delete(user_vault_item_input) + +Delete User Vault Item Endpoint + +Delete an item of a specific type for the user. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + user_vault_item_input = platform_api_python_client.UserVaultItemInput() # UserVaultItemInput | + + try: + # Delete User Vault Item Endpoint + api_response = api_instance.delete_user_vault_item_endpoint_user_vault_delete(user_vault_item_input) + print("The response of EXTERNALApi->delete_user_vault_item_endpoint_user_vault_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->delete_user_vault_item_endpoint_user_vault_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_vault_item_input** | [**UserVaultItemInput**](UserVaultItemInput.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_user_vault_items_endpoint_user_vault_get** +> ListUserVaultItemsResponse get_all_user_vault_items_endpoint_user_vault_get(type=type, search_query=search_query) + +Get All User Vault Items Endpoint + +Retrieve all items of a specific type for the user. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse +from platform_api_python_client.models.user_vault_type import UserVaultType +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + type = platform_api_python_client.UserVaultType() # UserVaultType | (optional) + search_query = 'search_query_example' # str | (optional) + + try: + # Get All User Vault Items Endpoint + api_response = api_instance.get_all_user_vault_items_endpoint_user_vault_get(type=type, search_query=search_query) + print("The response of EXTERNALApi->get_all_user_vault_items_endpoint_user_vault_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_all_user_vault_items_endpoint_user_vault_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | [**UserVaultType**](.md)| | [optional] + **search_query** | **str**| | [optional] + +### Return type + +[**ListUserVaultItemsResponse**](ListUserVaultItemsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_api_keys_credentials_api_key_get** +> ListAPIKeyResponse get_api_keys_credentials_api_key_get() + +Get Api Keys + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + + try: + # Get Api Keys + api_response = api_instance.get_api_keys_credentials_api_key_get() + print("The response of EXTERNALApi->get_api_keys_credentials_api_key_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_api_keys_credentials_api_key_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListAPIKeyResponse**](ListAPIKeyResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | + +[[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_clusters_clusters_get** +> ListGetClusterResponse get_clusters_clusters_get() + +Get Clusters + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + + try: + # Get Clusters + api_response = api_instance.get_clusters_clusters_get() + print("The response of EXTERNALApi->get_clusters_clusters_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_clusters_clusters_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListGetClusterResponse**](ListGetClusterResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | + +[[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_compute_deployment_deployments_compute_deployment_id_get** +> GetComputeDeploymentResponse get_compute_deployment_deployments_compute_deployment_id_get(deployment_id) + +Get Compute Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Compute Deployment + api_response = api_instance.get_compute_deployment_deployments_compute_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_compute_deployment_deployments_compute_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_compute_deployment_deployments_compute_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**GetComputeDeploymentResponse**](GetComputeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_credits_credits_get** +> CreditsResponse get_credits_credits_get() + +Get Credits + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + + try: + # Get Credits + api_response = api_instance.get_credits_credits_get() + print("The response of EXTERNALApi->get_credits_credits_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_credits_credits_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**CreditsResponse**](CreditsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | + +[[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_cserve_deployment_deployments_cserve_deployment_id_get** +> GetCServeDeploymentResponse get_cserve_deployment_deployments_cserve_deployment_id_get(deployment_id) + +Get Cserve Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Cserve Deployment + api_response = api_instance.get_cserve_deployment_deployments_cserve_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_cserve_deployment_deployments_cserve_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_cserve_deployment_deployments_cserve_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**GetCServeDeploymentResponse**](GetCServeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cserve_recipe_deployments_cserve_recipes_get** +> ListCServeRecipeResponse get_cserve_recipe_deployments_cserve_recipes_get(model=model, cluster_id=cluster_id) + +Get Cserve Recipe + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + model = 'model_example' # str | (optional) + cluster_id = 56 # int | (optional) + + try: + # Get Cserve Recipe + api_response = api_instance.get_cserve_recipe_deployments_cserve_recipes_get(model=model, cluster_id=cluster_id) + print("The response of EXTERNALApi->get_cserve_recipe_deployments_cserve_recipes_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_cserve_recipe_deployments_cserve_recipes_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **model** | **str**| | [optional] + **cluster_id** | **int**| | [optional] + +### Return type + +[**ListCServeRecipeResponse**](ListCServeRecipeResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get** +> GetCServeV2DeploymentResponse get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get(deployment_id) + +Get Cserve V2 Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Cserve V2 Deployment + api_response = api_instance.get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**GetCServeV2DeploymentResponse**](GetCServeV2DeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_deployment_logs_deployments_logs_deployment_id_get** +> GetDeploymentLogResponse get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) + +Get Deployment Logs + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + start_time = 56 # int | + end_time = 56 # int | + next_page_token = 'next_page_token_example' # str | (optional) + + try: + # Get Deployment Logs + api_response = api_instance.get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) + print("The response of EXTERNALApi->get_deployment_logs_deployments_logs_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_deployment_logs_deployments_logs_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + **start_time** | **int**| | + **end_time** | **int**| | + **next_page_token** | **str**| | [optional] + +### Return type + +[**GetDeploymentLogResponse**](GetDeploymentLogResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_deployment_status_deployments_status_deployment_id_get** +> DeploymentStatusResponse get_deployment_status_deployments_status_deployment_id_get(deployment_id) + +Get Deployment Status + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Deployment Status + api_response = api_instance.get_deployment_status_deployments_status_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_deployment_status_deployments_status_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_deployment_status_deployments_status_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**DeploymentStatusResponse**](DeploymentStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_deployments_deployments_get** +> ListGetDeploymentResponse get_deployments_deployments_get(offset=offset, limit=limit, type=type, search_query=search_query) + +Get Deployments + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + offset = 56 # int | (optional) + limit = 56 # int | (optional) + type = platform_api_python_client.DeploymentType() # DeploymentType | (optional) + search_query = 'search_query_example' # str | (optional) + + try: + # Get Deployments + api_response = api_instance.get_deployments_deployments_get(offset=offset, limit=limit, type=type, search_query=search_query) + print("The response of EXTERNALApi->get_deployments_deployments_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_deployments_deployments_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| | [optional] + **limit** | **int**| | [optional] + **type** | [**DeploymentType**](.md)| | [optional] + **search_query** | **str**| | [optional] + +### Return type + +[**ListGetDeploymentResponse**](ListGetDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_hardware_instances_hardware_instances_get** +> ListHardwareInstanceResponse get_hardware_instances_hardware_instances_get(cluster_id=cluster_id) + +Get Hardware Instances + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + cluster_id = 56 # int | (optional) + + try: + # Get Hardware Instances + api_response = api_instance.get_hardware_instances_hardware_instances_get(cluster_id=cluster_id) + print("The response of EXTERNALApi->get_hardware_instances_hardware_instances_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_hardware_instances_hardware_instances_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | [optional] + +### Return type + +[**ListHardwareInstanceResponse**](ListHardwareInstanceResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_inference_deployment_deployments_inference_deployment_id_get** +> GetInferenceDeploymentResponse get_inference_deployment_deployments_inference_deployment_id_get(deployment_id) + +Get Inference Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Inference Deployment + api_response = api_instance.get_inference_deployment_deployments_inference_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_inference_deployment_deployments_inference_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_inference_deployment_deployments_inference_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**GetInferenceDeploymentResponse**](GetInferenceDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payments_payments_get** +> GetPaymentsResponse get_payments_payments_get(limit=limit, starting_after=starting_after) + +Get Payments + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + limit = 10 # int | (optional) (default to 10) + starting_after = 'starting_after_example' # str | (optional) + + try: + # Get Payments + api_response = api_instance.get_payments_payments_get(limit=limit, starting_after=starting_after) + print("The response of EXTERNALApi->get_payments_payments_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_payments_payments_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] [default to 10] + **starting_after** | **str**| | [optional] + +### Return type + +[**GetPaymentsResponse**](GetPaymentsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_prebuilt_images_prebuilt_images_get** +> ListPrebuiltImageResponse get_prebuilt_images_prebuilt_images_get(type=type) + +Get Prebuilt Images + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + type = platform_api_python_client.DeploymentType() # DeploymentType | (optional) + + try: + # Get Prebuilt Images + api_response = api_instance.get_prebuilt_images_prebuilt_images_get(type=type) + print("The response of EXTERNALApi->get_prebuilt_images_prebuilt_images_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_prebuilt_images_prebuilt_images_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | [**DeploymentType**](.md)| | [optional] + +### Return type + +[**ListPrebuiltImageResponse**](ListPrebuiltImageResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_rag_deployment_deployments_rag_deployment_id_get** +> GetRagDeploymentResponse get_rag_deployment_deployments_rag_deployment_id_get(deployment_id) + +Get Rag Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Rag Deployment + api_response = api_instance.get_rag_deployment_deployments_rag_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_rag_deployment_deployments_rag_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_rag_deployment_deployments_rag_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**GetRagDeploymentResponse**](GetRagDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_usage_daily_bills_get** +> ListDailyBillResponse get_usage_daily_bills_get(start_date, end_date) + +Get Usage + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + start_date = '2013-10-20' # date | + end_date = '2013-10-20' # date | + + try: + # Get Usage + api_response = api_instance.get_usage_daily_bills_get(start_date, end_date) + print("The response of EXTERNALApi->get_usage_daily_bills_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_usage_daily_bills_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **date**| | + **end_date** | **date**| | + +### Return type + +[**ListDailyBillResponse**](ListDailyBillResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_usage_deployments_usage_deployment_id_get** +> GetDeploymentUsageResponse get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) + +Get Usage + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + metric = platform_api_python_client.Metric() # Metric | + duration = 56 # int | + end_time = 56 # int | (optional) + + try: + # Get Usage + api_response = api_instance.get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) + print("The response of EXTERNALApi->get_usage_deployments_usage_deployment_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_usage_deployments_usage_deployment_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + **metric** | [**Metric**](.md)| | + **duration** | **int**| | + **end_time** | **int**| | [optional] + +### Return type + +[**GetDeploymentUsageResponse**](GetDeploymentUsageResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **setup_stripe_customer_payments_setup_post** +> object setup_stripe_customer_payments_setup_post() + +Setup Stripe Customer + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + + try: + # Setup Stripe Customer + api_response = api_instance.setup_stripe_customer_payments_setup_post() + print("The response of EXTERNALApi->setup_stripe_customer_payments_setup_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->setup_stripe_customer_payments_setup_post: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | + +[[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_deployment_status_deployments_status_deployment_id_put** +> DeploymentStatusResponse update_deployment_status_deployments_status_deployment_id_put(deployment_id, deployment_status_request) + +Update Deployment Status + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + deployment_status_request = platform_api_python_client.DeploymentStatusRequest() # DeploymentStatusRequest | + + try: + # Update Deployment Status + api_response = api_instance.update_deployment_status_deployments_status_deployment_id_put(deployment_id, deployment_status_request) + print("The response of EXTERNALApi->update_deployment_status_deployments_status_deployment_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->update_deployment_status_deployments_status_deployment_id_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + **deployment_status_request** | [**DeploymentStatusRequest**](DeploymentStatusRequest.md)| | + +### Return type + +[**DeploymentStatusResponse**](DeploymentStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_user_vault_item_endpoint_user_vault_put** +> object update_user_vault_item_endpoint_user_vault_put(user_vault_item_input) + +Update User Vault Item Endpoint + +Update or add multiple items of a specific type for the user. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + user_vault_item_input = platform_api_python_client.UserVaultItemInput() # UserVaultItemInput | + + try: + # Update User Vault Item Endpoint + api_response = api_instance.update_user_vault_item_endpoint_user_vault_put(user_vault_item_input) + print("The response of EXTERNALApi->update_user_vault_item_endpoint_user_vault_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->update_user_vault_item_endpoint_user_vault_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_vault_item_input** | [**UserVaultItemInput**](UserVaultItemInput.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/platform_api_python_client/docs/GetCServeDeploymentResponse.md b/platform_api_python_client/docs/GetCServeDeploymentResponse.md new file mode 100644 index 0000000..f6ca201 --- /dev/null +++ b/platform_api_python_client/docs/GetCServeDeploymentResponse.md @@ -0,0 +1,66 @@ +# GetCServeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**is_embedding_model** | **bool** | | [default to False] +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**block_size** | **int** | | [default to 32] +**swap_space** | **int** | | [default to 0] +**gpu_mem_util** | **float** | | [default to 0.95] +**max_num_seqs** | **int** | | [default to 256] +**offloading_num** | **int** | | [default to 0] +**use_prefix_caching** | **bool** | | +**use_chunked_prefill** | **bool** | | +**chunked_prefill_size** | **int** | | +**eager_execution** | **bool** | | +**num_scheduler_steps** | **int** | | +**use_flashinfer** | **bool** | | [default to False] +**max_model_len** | **int** | | +**dtype** | **str** | | [default to 'auto'] +**tokenizer** | **str** | | +**spec_proposer** | **str** | | +**spec_draft_model** | **str** | | +**spec_tokens** | **int** | | +**spec_prompt_lookup_min** | **int** | | +**spec_prompt_lookup_max** | **int** | | +**seed** | **int** | | [default to 0] +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**endpoint_certificate_authority** | **str** | | +**concurrency** | **int** | | +**env_vars** | **Dict[str, str]** | | + +## Example + +```python +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetCServeDeploymentResponse from a JSON string +get_c_serve_deployment_response_instance = GetCServeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetCServeDeploymentResponse.to_json()) + +# convert the object into a dict +get_c_serve_deployment_response_dict = get_c_serve_deployment_response_instance.to_dict() +# create an instance of GetCServeDeploymentResponse from a dict +get_c_serve_deployment_response_from_dict = GetCServeDeploymentResponse.from_dict(get_c_serve_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetCServeV2DeploymentResponse.md b/platform_api_python_client/docs/GetCServeV2DeploymentResponse.md new file mode 100644 index 0000000..660be09 --- /dev/null +++ b/platform_api_python_client/docs/GetCServeV2DeploymentResponse.md @@ -0,0 +1,43 @@ +# GetCServeV2DeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**endpoint_certificate_authority** | **str** | | +**concurrency** | **int** | | +**env_vars** | **Dict[str, str]** | | + +## Example + +```python +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetCServeV2DeploymentResponse from a JSON string +get_c_serve_v2_deployment_response_instance = GetCServeV2DeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetCServeV2DeploymentResponse.to_json()) + +# convert the object into a dict +get_c_serve_v2_deployment_response_dict = get_c_serve_v2_deployment_response_instance.to_dict() +# create an instance of GetCServeV2DeploymentResponse from a dict +get_c_serve_v2_deployment_response_from_dict = GetCServeV2DeploymentResponse.from_dict(get_c_serve_v2_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetClusterResponse.md b/platform_api_python_client/docs/GetClusterResponse.md new file mode 100644 index 0000000..a18bbc3 --- /dev/null +++ b/platform_api_python_client/docs/GetClusterResponse.md @@ -0,0 +1,31 @@ +# GetClusterResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**display_name** | **str** | | +**region** | **str** | | + +## Example + +```python +from platform_api_python_client.models.get_cluster_response import GetClusterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetClusterResponse from a JSON string +get_cluster_response_instance = GetClusterResponse.from_json(json) +# print the JSON string representation of the object +print(GetClusterResponse.to_json()) + +# convert the object into a dict +get_cluster_response_dict = get_cluster_response_instance.to_dict() +# create an instance of GetClusterResponse from a dict +get_cluster_response_from_dict = GetClusterResponse.from_dict(get_cluster_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetComputeDeploymentResponse.md b/platform_api_python_client/docs/GetComputeDeploymentResponse.md new file mode 100644 index 0000000..0a1876b --- /dev/null +++ b/platform_api_python_client/docs/GetComputeDeploymentResponse.md @@ -0,0 +1,41 @@ +# GetComputeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**exposed_port** | **int** | | +**ssh_public_key** | **str** | | +**ssh_password** | **str** | | +**env_vars** | **Dict[str, str]** | | + +## Example + +```python +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetComputeDeploymentResponse from a JSON string +get_compute_deployment_response_instance = GetComputeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetComputeDeploymentResponse.to_json()) + +# convert the object into a dict +get_compute_deployment_response_dict = get_compute_deployment_response_instance.to_dict() +# create an instance of GetComputeDeploymentResponse from a dict +get_compute_deployment_response_from_dict = GetComputeDeploymentResponse.from_dict(get_compute_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetDeploymentLogResponse.md b/platform_api_python_client/docs/GetDeploymentLogResponse.md new file mode 100644 index 0000000..a75aa7d --- /dev/null +++ b/platform_api_python_client/docs/GetDeploymentLogResponse.md @@ -0,0 +1,30 @@ +# GetDeploymentLogResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | **List[object]** | | +**next_page_token** | **str** | | + +## Example + +```python +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeploymentLogResponse from a JSON string +get_deployment_log_response_instance = GetDeploymentLogResponse.from_json(json) +# print the JSON string representation of the object +print(GetDeploymentLogResponse.to_json()) + +# convert the object into a dict +get_deployment_log_response_dict = get_deployment_log_response_instance.to_dict() +# create an instance of GetDeploymentLogResponse from a dict +get_deployment_log_response_from_dict = GetDeploymentLogResponse.from_dict(get_deployment_log_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetDeploymentResponse.md b/platform_api_python_client/docs/GetDeploymentResponse.md new file mode 100644 index 0000000..84c0fdd --- /dev/null +++ b/platform_api_python_client/docs/GetDeploymentResponse.md @@ -0,0 +1,37 @@ +# GetDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | + +## Example + +```python +from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeploymentResponse from a JSON string +get_deployment_response_instance = GetDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetDeploymentResponse.to_json()) + +# convert the object into a dict +get_deployment_response_dict = get_deployment_response_instance.to_dict() +# create an instance of GetDeploymentResponse from a dict +get_deployment_response_from_dict = GetDeploymentResponse.from_dict(get_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetDeploymentUsageResponse.md b/platform_api_python_client/docs/GetDeploymentUsageResponse.md new file mode 100644 index 0000000..99330d3 --- /dev/null +++ b/platform_api_python_client/docs/GetDeploymentUsageResponse.md @@ -0,0 +1,29 @@ +# GetDeploymentUsageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**List[DeploymentUsageValue]**](DeploymentUsageValue.md) | | + +## Example + +```python +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeploymentUsageResponse from a JSON string +get_deployment_usage_response_instance = GetDeploymentUsageResponse.from_json(json) +# print the JSON string representation of the object +print(GetDeploymentUsageResponse.to_json()) + +# convert the object into a dict +get_deployment_usage_response_dict = get_deployment_usage_response_instance.to_dict() +# create an instance of GetDeploymentUsageResponse from a dict +get_deployment_usage_response_from_dict = GetDeploymentUsageResponse.from_dict(get_deployment_usage_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetInferenceDeploymentResponse.md b/platform_api_python_client/docs/GetInferenceDeploymentResponse.md new file mode 100644 index 0000000..023b9c0 --- /dev/null +++ b/platform_api_python_client/docs/GetInferenceDeploymentResponse.md @@ -0,0 +1,46 @@ +# GetInferenceDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**container_port** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | +**healthcheck** | **str** | | +**endpoint_certificate_authority** | **str** | | +**env_vars** | **Dict[str, str]** | | +**command** | **List[str]** | | +**command_args** | **List[str]** | | + +## Example + +```python +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInferenceDeploymentResponse from a JSON string +get_inference_deployment_response_instance = GetInferenceDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetInferenceDeploymentResponse.to_json()) + +# convert the object into a dict +get_inference_deployment_response_dict = get_inference_deployment_response_instance.to_dict() +# create an instance of GetInferenceDeploymentResponse from a dict +get_inference_deployment_response_from_dict = GetInferenceDeploymentResponse.from_dict(get_inference_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetPaymentsResponse.md b/platform_api_python_client/docs/GetPaymentsResponse.md new file mode 100644 index 0000000..8266139 --- /dev/null +++ b/platform_api_python_client/docs/GetPaymentsResponse.md @@ -0,0 +1,30 @@ +# GetPaymentsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | | +**payments** | **List[object]** | | + +## Example + +```python +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPaymentsResponse from a JSON string +get_payments_response_instance = GetPaymentsResponse.from_json(json) +# print the JSON string representation of the object +print(GetPaymentsResponse.to_json()) + +# convert the object into a dict +get_payments_response_dict = get_payments_response_instance.to_dict() +# create an instance of GetPaymentsResponse from a dict +get_payments_response_from_dict = GetPaymentsResponse.from_dict(get_payments_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/GetRagDeploymentResponse.md b/platform_api_python_client/docs/GetRagDeploymentResponse.md new file mode 100644 index 0000000..2054d41 --- /dev/null +++ b/platform_api_python_client/docs/GetRagDeploymentResponse.md @@ -0,0 +1,44 @@ +# GetRagDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**centml_api_key** | **str** | | +**min_scale** | **int** | | [default to 1] +**max_scale** | **int** | | [default to 1] +**endpoint_certificate_authority** | **str** | | +**concurrency** | **int** | | +**env_vars** | **Dict[str, str]** | | + +## Example + +```python +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetRagDeploymentResponse from a JSON string +get_rag_deployment_response_instance = GetRagDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetRagDeploymentResponse.to_json()) + +# convert the object into a dict +get_rag_deployment_response_dict = get_rag_deployment_response_instance.to_dict() +# create an instance of GetRagDeploymentResponse from a dict +get_rag_deployment_response_from_dict = GetRagDeploymentResponse.from_dict(get_rag_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/HTTPValidationError.md b/platform_api_python_client/docs/HTTPValidationError.md new file mode 100644 index 0000000..bbb693a --- /dev/null +++ b/platform_api_python_client/docs/HTTPValidationError.md @@ -0,0 +1,29 @@ +# HTTPValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] + +## Example + +```python +from platform_api_python_client.models.http_validation_error import HTTPValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of HTTPValidationError from a JSON string +http_validation_error_instance = HTTPValidationError.from_json(json) +# print the JSON string representation of the object +print(HTTPValidationError.to_json()) + +# convert the object into a dict +http_validation_error_dict = http_validation_error_instance.to_dict() +# create an instance of HTTPValidationError from a dict +http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_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/platform_api_python_client/docs/HardwareInstanceResponse.md b/platform_api_python_client/docs/HardwareInstanceResponse.md new file mode 100644 index 0000000..137c575 --- /dev/null +++ b/platform_api_python_client/docs/HardwareInstanceResponse.md @@ -0,0 +1,38 @@ +# HardwareInstanceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**gpu_type** | **str** | | +**num_gpu** | **int** | | +**cpu** | **int** | | +**memory** | **int** | | +**cost_per_hr** | **int** | | +**cluster_id** | **int** | | +**provider** | **str** | | +**num_accelerators** | **int** | | + +## Example + +```python +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HardwareInstanceResponse from a JSON string +hardware_instance_response_instance = HardwareInstanceResponse.from_json(json) +# print the JSON string representation of the object +print(HardwareInstanceResponse.to_json()) + +# convert the object into a dict +hardware_instance_response_dict = hardware_instance_response_instance.to_dict() +# create an instance of HardwareInstanceResponse from a dict +hardware_instance_response_from_dict = HardwareInstanceResponse.from_dict(hardware_instance_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListAPIKeyResponse.md b/platform_api_python_client/docs/ListAPIKeyResponse.md new file mode 100644 index 0000000..46ebe91 --- /dev/null +++ b/platform_api_python_client/docs/ListAPIKeyResponse.md @@ -0,0 +1,29 @@ +# ListAPIKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[APIKeyResponse]**](APIKeyResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListAPIKeyResponse from a JSON string +list_api_key_response_instance = ListAPIKeyResponse.from_json(json) +# print the JSON string representation of the object +print(ListAPIKeyResponse.to_json()) + +# convert the object into a dict +list_api_key_response_dict = list_api_key_response_instance.to_dict() +# create an instance of ListAPIKeyResponse from a dict +list_api_key_response_from_dict = ListAPIKeyResponse.from_dict(list_api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListCServeRecipeResponse.md b/platform_api_python_client/docs/ListCServeRecipeResponse.md new file mode 100644 index 0000000..aaf6e01 --- /dev/null +++ b/platform_api_python_client/docs/ListCServeRecipeResponse.md @@ -0,0 +1,29 @@ +# ListCServeRecipeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[CServeRecipeResponse]**](CServeRecipeResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListCServeRecipeResponse from a JSON string +list_c_serve_recipe_response_instance = ListCServeRecipeResponse.from_json(json) +# print the JSON string representation of the object +print(ListCServeRecipeResponse.to_json()) + +# convert the object into a dict +list_c_serve_recipe_response_dict = list_c_serve_recipe_response_instance.to_dict() +# create an instance of ListCServeRecipeResponse from a dict +list_c_serve_recipe_response_from_dict = ListCServeRecipeResponse.from_dict(list_c_serve_recipe_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListDailyBillResponse.md b/platform_api_python_client/docs/ListDailyBillResponse.md new file mode 100644 index 0000000..4f8d485 --- /dev/null +++ b/platform_api_python_client/docs/ListDailyBillResponse.md @@ -0,0 +1,29 @@ +# ListDailyBillResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[DailyBillResponse]**](DailyBillResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDailyBillResponse from a JSON string +list_daily_bill_response_instance = ListDailyBillResponse.from_json(json) +# print the JSON string representation of the object +print(ListDailyBillResponse.to_json()) + +# convert the object into a dict +list_daily_bill_response_dict = list_daily_bill_response_instance.to_dict() +# create an instance of ListDailyBillResponse from a dict +list_daily_bill_response_from_dict = ListDailyBillResponse.from_dict(list_daily_bill_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListGetClusterResponse.md b/platform_api_python_client/docs/ListGetClusterResponse.md new file mode 100644 index 0000000..08e50d4 --- /dev/null +++ b/platform_api_python_client/docs/ListGetClusterResponse.md @@ -0,0 +1,29 @@ +# ListGetClusterResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[GetClusterResponse]**](GetClusterResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGetClusterResponse from a JSON string +list_get_cluster_response_instance = ListGetClusterResponse.from_json(json) +# print the JSON string representation of the object +print(ListGetClusterResponse.to_json()) + +# convert the object into a dict +list_get_cluster_response_dict = list_get_cluster_response_instance.to_dict() +# create an instance of ListGetClusterResponse from a dict +list_get_cluster_response_from_dict = ListGetClusterResponse.from_dict(list_get_cluster_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListGetDeploymentResponse.md b/platform_api_python_client/docs/ListGetDeploymentResponse.md new file mode 100644 index 0000000..151fd73 --- /dev/null +++ b/platform_api_python_client/docs/ListGetDeploymentResponse.md @@ -0,0 +1,29 @@ +# ListGetDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[GetDeploymentResponse]**](GetDeploymentResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGetDeploymentResponse from a JSON string +list_get_deployment_response_instance = ListGetDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(ListGetDeploymentResponse.to_json()) + +# convert the object into a dict +list_get_deployment_response_dict = list_get_deployment_response_instance.to_dict() +# create an instance of ListGetDeploymentResponse from a dict +list_get_deployment_response_from_dict = ListGetDeploymentResponse.from_dict(list_get_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListHardwareInstanceResponse.md b/platform_api_python_client/docs/ListHardwareInstanceResponse.md new file mode 100644 index 0000000..5674076 --- /dev/null +++ b/platform_api_python_client/docs/ListHardwareInstanceResponse.md @@ -0,0 +1,29 @@ +# ListHardwareInstanceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[HardwareInstanceResponse]**](HardwareInstanceResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListHardwareInstanceResponse from a JSON string +list_hardware_instance_response_instance = ListHardwareInstanceResponse.from_json(json) +# print the JSON string representation of the object +print(ListHardwareInstanceResponse.to_json()) + +# convert the object into a dict +list_hardware_instance_response_dict = list_hardware_instance_response_instance.to_dict() +# create an instance of ListHardwareInstanceResponse from a dict +list_hardware_instance_response_from_dict = ListHardwareInstanceResponse.from_dict(list_hardware_instance_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListPrebuiltImageResponse.md b/platform_api_python_client/docs/ListPrebuiltImageResponse.md new file mode 100644 index 0000000..e8f851f --- /dev/null +++ b/platform_api_python_client/docs/ListPrebuiltImageResponse.md @@ -0,0 +1,29 @@ +# ListPrebuiltImageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PrebuiltImageResponse]**](PrebuiltImageResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListPrebuiltImageResponse from a JSON string +list_prebuilt_image_response_instance = ListPrebuiltImageResponse.from_json(json) +# print the JSON string representation of the object +print(ListPrebuiltImageResponse.to_json()) + +# convert the object into a dict +list_prebuilt_image_response_dict = list_prebuilt_image_response_instance.to_dict() +# create an instance of ListPrebuiltImageResponse from a dict +list_prebuilt_image_response_from_dict = ListPrebuiltImageResponse.from_dict(list_prebuilt_image_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ListUserVaultItemsResponse.md b/platform_api_python_client/docs/ListUserVaultItemsResponse.md new file mode 100644 index 0000000..f817e0e --- /dev/null +++ b/platform_api_python_client/docs/ListUserVaultItemsResponse.md @@ -0,0 +1,29 @@ +# ListUserVaultItemsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[UserVaultItemOutput]**](UserVaultItemOutput.md) | | + +## Example + +```python +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListUserVaultItemsResponse from a JSON string +list_user_vault_items_response_instance = ListUserVaultItemsResponse.from_json(json) +# print the JSON string representation of the object +print(ListUserVaultItemsResponse.to_json()) + +# convert the object into a dict +list_user_vault_items_response_dict = list_user_vault_items_response_instance.to_dict() +# create an instance of ListUserVaultItemsResponse from a dict +list_user_vault_items_response_from_dict = ListUserVaultItemsResponse.from_dict(list_user_vault_items_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/Metric.md b/platform_api_python_client/docs/Metric.md new file mode 100644 index 0000000..52c4312 --- /dev/null +++ b/platform_api_python_client/docs/Metric.md @@ -0,0 +1,14 @@ +# Metric + + +## Enum + +* `CPU` (value: `'cpu'`) + +* `MEMORY` (value: `'memory'`) + +* `GPU` (value: `'gpu'`) + +[[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/platform_api_python_client/docs/PrebuiltImageResponse.md b/platform_api_python_client/docs/PrebuiltImageResponse.md new file mode 100644 index 0000000..f318dff --- /dev/null +++ b/platform_api_python_client/docs/PrebuiltImageResponse.md @@ -0,0 +1,34 @@ +# PrebuiltImageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_name** | **str** | | +**label** | **str** | | +**tags** | **List[str]** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**port** | **int** | | +**healthcheck** | **str** | | + +## Example + +```python +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrebuiltImageResponse from a JSON string +prebuilt_image_response_instance = PrebuiltImageResponse.from_json(json) +# print the JSON string representation of the object +print(PrebuiltImageResponse.to_json()) + +# convert the object into a dict +prebuilt_image_response_dict = prebuilt_image_response_instance.to_dict() +# create an instance of PrebuiltImageResponse from a dict +prebuilt_image_response_from_dict = PrebuiltImageResponse.from_dict(prebuilt_image_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/ServiceStatus.md b/platform_api_python_client/docs/ServiceStatus.md new file mode 100644 index 0000000..a6ce0d6 --- /dev/null +++ b/platform_api_python_client/docs/ServiceStatus.md @@ -0,0 +1,32 @@ +# ServiceStatus + + +## Enum + +* `HEALTHY` (value: `'Healthy'`) + +* `MISSING` (value: `'Missing'`) + +* `SCALINGUP` (value: `'ScalingUp'`) + +* `PULLING` (value: `'Pulling'`) + +* `INITIALIZING` (value: `'Initializing'`) + +* `ERROR` (value: `'Error'`) + +* `CREATECONTAINERCONFIGERROR` (value: `'CreateContainerConfigError'`) + +* `CRASHLOOPBACKOFF` (value: `'CrashLoopBackOff'`) + +* `IMAGEPULLBACKOFF` (value: `'ImagePullBackOff'`) + +* `PROGRESSDEADLINEEXCEEDED` (value: `'ProgressDeadlineExceeded'`) + +* `NOTREADY` (value: `'NotReady'`) + +* `UNKNOWN` (value: `'Unknown'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/docs/UserSupportEmailRequest.md b/platform_api_python_client/docs/UserSupportEmailRequest.md new file mode 100644 index 0000000..bb87b94 --- /dev/null +++ b/platform_api_python_client/docs/UserSupportEmailRequest.md @@ -0,0 +1,31 @@ +# UserSupportEmailRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**subject** | **str** | | +**send_to_sales** | **bool** | | + +## Example + +```python +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSupportEmailRequest from a JSON string +user_support_email_request_instance = UserSupportEmailRequest.from_json(json) +# print the JSON string representation of the object +print(UserSupportEmailRequest.to_json()) + +# convert the object into a dict +user_support_email_request_dict = user_support_email_request_instance.to_dict() +# create an instance of UserSupportEmailRequest from a dict +user_support_email_request_from_dict = UserSupportEmailRequest.from_dict(user_support_email_request_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/platform_api_python_client/docs/UserVaultItemInput.md b/platform_api_python_client/docs/UserVaultItemInput.md new file mode 100644 index 0000000..6733c27 --- /dev/null +++ b/platform_api_python_client/docs/UserVaultItemInput.md @@ -0,0 +1,31 @@ +# UserVaultItemInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**UserVaultType**](UserVaultType.md) | | +**key** | **str** | | +**value** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput + +# TODO update the JSON string below +json = "{}" +# create an instance of UserVaultItemInput from a JSON string +user_vault_item_input_instance = UserVaultItemInput.from_json(json) +# print the JSON string representation of the object +print(UserVaultItemInput.to_json()) + +# convert the object into a dict +user_vault_item_input_dict = user_vault_item_input_instance.to_dict() +# create an instance of UserVaultItemInput from a dict +user_vault_item_input_from_dict = UserVaultItemInput.from_dict(user_vault_item_input_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/platform_api_python_client/docs/UserVaultItemOutput.md b/platform_api_python_client/docs/UserVaultItemOutput.md new file mode 100644 index 0000000..9ce5e0b --- /dev/null +++ b/platform_api_python_client/docs/UserVaultItemOutput.md @@ -0,0 +1,31 @@ +# UserVaultItemOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**UserVaultType**](UserVaultType.md) | | +**key** | **str** | | +**value** | **str** | | + +## Example + +```python +from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of UserVaultItemOutput from a JSON string +user_vault_item_output_instance = UserVaultItemOutput.from_json(json) +# print the JSON string representation of the object +print(UserVaultItemOutput.to_json()) + +# convert the object into a dict +user_vault_item_output_dict = user_vault_item_output_instance.to_dict() +# create an instance of UserVaultItemOutput from a dict +user_vault_item_output_from_dict = UserVaultItemOutput.from_dict(user_vault_item_output_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/platform_api_python_client/docs/UserVaultType.md b/platform_api_python_client/docs/UserVaultType.md new file mode 100644 index 0000000..2c74e78 --- /dev/null +++ b/platform_api_python_client/docs/UserVaultType.md @@ -0,0 +1,16 @@ +# UserVaultType + + +## Enum + +* `ENV_VARS` (value: `'env_vars'`) + +* `SSH_KEYS` (value: `'ssh_keys'`) + +* `ACCESS_TOKENS` (value: `'access_tokens'`) + +* `CERTIFICATES` (value: `'certificates'`) + +[[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/platform_api_python_client/docs/ValidationError.md b/platform_api_python_client/docs/ValidationError.md new file mode 100644 index 0000000..0a9d146 --- /dev/null +++ b/platform_api_python_client/docs/ValidationError.md @@ -0,0 +1,31 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | +**msg** | **str** | | +**type** | **str** | | + +## Example + +```python +from platform_api_python_client.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_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/platform_api_python_client/docs/ValidationErrorLocInner.md b/platform_api_python_client/docs/ValidationErrorLocInner.md new file mode 100644 index 0000000..cd238f4 --- /dev/null +++ b/platform_api_python_client/docs/ValidationErrorLocInner.md @@ -0,0 +1,28 @@ +# ValidationErrorLocInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorLocInner from a JSON string +validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorLocInner.to_json()) + +# convert the object into a dict +validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict() +# create an instance of ValidationErrorLocInner from a dict +validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/git_push.sh b/platform_api_python_client/git_push.sh new file mode 100644 index 0000000..9a73e8a --- /dev/null +++ b/platform_api_python_client/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="centml" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="platform/client" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/platform_api_python_client/platform_api_python_client/__init__.py b/platform_api_python_client/platform_api_python_client/__init__.py new file mode 100644 index 0000000..8aec505 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/__init__.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from platform_api_python_client.api.external_api import EXTERNALApi + +# import ApiClient +from platform_api_python_client.api_response import ApiResponse +from platform_api_python_client.api_client import ApiClient +from platform_api_python_client.configuration import Configuration +from platform_api_python_client.exceptions import OpenApiException +from platform_api_python_client.exceptions import ApiTypeError +from platform_api_python_client.exceptions import ApiValueError +from platform_api_python_client.exceptions import ApiKeyError +from platform_api_python_client.exceptions import ApiAttributeError +from platform_api_python_client.exceptions import ApiException + +# import models into sdk package +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.c_serve_recipe import CServeRecipe +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse +from platform_api_python_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from platform_api_python_client.models.user_vault_type import UserVaultType +from platform_api_python_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/platform_api_python_client/api/__init__.py b/platform_api_python_client/platform_api_python_client/api/__init__.py new file mode 100644 index 0000000..bd125dd --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from platform_api_python_client.api.external_api import EXTERNALApi + diff --git a/platform_api_python_client/platform_api_python_client/api/external_api.py b/platform_api_python_client/platform_api_python_client/api/external_api.py new file mode 100644 index 0000000..b4e6f6c --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/api/external_api.py @@ -0,0 +1,8515 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 datetime import date +from pydantic import StrictInt, StrictStr +from typing import Any, Optional +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_type import UserVaultType + +from platform_api_python_client.api_client import ApiClient, RequestSerialized +from platform_api_python_client.api_response import ApiResponse +from platform_api_python_client.rest import RESTResponseType + + +class EXTERNALApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_user_request_support_user_requests_post( + self, + user_support_email_request: UserSupportEmailRequest, + _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, + ) -> object: + """Add User Request + + + :param user_support_email_request: (required) + :type user_support_email_request: UserSupportEmailRequest + :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._add_user_request_support_user_requests_post_serialize( + user_support_email_request=user_support_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_user_request_support_user_requests_post_with_http_info( + self, + user_support_email_request: UserSupportEmailRequest, + _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[object]: + """Add User Request + + + :param user_support_email_request: (required) + :type user_support_email_request: UserSupportEmailRequest + :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._add_user_request_support_user_requests_post_serialize( + user_support_email_request=user_support_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_user_request_support_user_requests_post_without_preload_content( + self, + user_support_email_request: UserSupportEmailRequest, + _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: + """Add User Request + + + :param user_support_email_request: (required) + :type user_support_email_request: UserSupportEmailRequest + :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._add_user_request_support_user_requests_post_serialize( + user_support_email_request=user_support_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_user_request_support_user_requests_post_serialize( + self, + user_support_email_request, + _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 user_support_email_request is not None: + _body_params = user_support_email_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/support/user-requests', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_api_key_credentials_api_key_post( + self, + api_key_request: APIKeyRequest, + _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, + ) -> APIKeyResponse: + """Create Api Key + + + :param api_key_request: (required) + :type api_key_request: APIKeyRequest + :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_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "APIKeyResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_api_key_credentials_api_key_post_with_http_info( + self, + api_key_request: APIKeyRequest, + _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[APIKeyResponse]: + """Create Api Key + + + :param api_key_request: (required) + :type api_key_request: APIKeyRequest + :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_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "APIKeyResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_api_key_credentials_api_key_post_without_preload_content( + self, + api_key_request: APIKeyRequest, + _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 Api Key + + + :param api_key_request: (required) + :type api_key_request: APIKeyRequest + :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_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "APIKeyResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_api_key_credentials_api_key_post_serialize( + self, + api_key_request, + _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 api_key_request is not None: + _body_params = api_key_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/credentials/api-key', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_checkout_payments_checkout_post( + self, + create_checkout_request: CreateCheckoutRequest, + _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, + ) -> CreateCheckoutResponse: + """Create Checkout + + + :param create_checkout_request: (required) + :type create_checkout_request: CreateCheckoutRequest + :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_checkout_payments_checkout_post_serialize( + create_checkout_request=create_checkout_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCheckoutResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_checkout_payments_checkout_post_with_http_info( + self, + create_checkout_request: CreateCheckoutRequest, + _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[CreateCheckoutResponse]: + """Create Checkout + + + :param create_checkout_request: (required) + :type create_checkout_request: CreateCheckoutRequest + :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_checkout_payments_checkout_post_serialize( + create_checkout_request=create_checkout_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCheckoutResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_checkout_payments_checkout_post_without_preload_content( + self, + create_checkout_request: CreateCheckoutRequest, + _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 Checkout + + + :param create_checkout_request: (required) + :type create_checkout_request: CreateCheckoutRequest + :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_checkout_payments_checkout_post_serialize( + create_checkout_request=create_checkout_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCheckoutResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_checkout_payments_checkout_post_serialize( + self, + create_checkout_request, + _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 create_checkout_request is not None: + _body_params = create_checkout_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/checkout', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_compute_deployment_deployments_compute_post( + self, + create_compute_deployment_request: CreateComputeDeploymentRequest, + _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, + ) -> CreateComputeDeploymentResponse: + """Create Compute Deployment + + + :param create_compute_deployment_request: (required) + :type create_compute_deployment_request: CreateComputeDeploymentRequest + :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_compute_deployment_deployments_compute_post_serialize( + create_compute_deployment_request=create_compute_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_compute_deployment_deployments_compute_post_with_http_info( + self, + create_compute_deployment_request: CreateComputeDeploymentRequest, + _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[CreateComputeDeploymentResponse]: + """Create Compute Deployment + + + :param create_compute_deployment_request: (required) + :type create_compute_deployment_request: CreateComputeDeploymentRequest + :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_compute_deployment_deployments_compute_post_serialize( + create_compute_deployment_request=create_compute_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_compute_deployment_deployments_compute_post_without_preload_content( + self, + create_compute_deployment_request: CreateComputeDeploymentRequest, + _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 Compute Deployment + + + :param create_compute_deployment_request: (required) + :type create_compute_deployment_request: CreateComputeDeploymentRequest + :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_compute_deployment_deployments_compute_post_serialize( + create_compute_deployment_request=create_compute_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_compute_deployment_deployments_compute_post_serialize( + self, + create_compute_deployment_request, + _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 create_compute_deployment_request is not None: + _body_params = create_compute_deployment_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deployments/compute', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_cserve_deployment_deployments_cserve_post( + self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, + _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, + ) -> CreateCServeDeploymentResponse: + """Create Cserve Deployment + + + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest + :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_cserve_deployment_deployments_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_cserve_deployment_deployments_cserve_post_with_http_info( + self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, + _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[CreateCServeDeploymentResponse]: + """Create Cserve Deployment + + + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest + :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_cserve_deployment_deployments_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_cserve_deployment_deployments_cserve_post_without_preload_content( + self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, + _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 Cserve Deployment + + + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest + :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_cserve_deployment_deployments_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_cserve_deployment_deployments_cserve_post_serialize( + self, + create_c_serve_deployment_request, + _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 create_c_serve_deployment_request is not None: + _body_params = create_c_serve_deployment_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deployments/cserve', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_cserve_v2_deployment_deployments_cserve_v2_post( + self, + create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest, + _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, + ) -> CreateCServeV2DeploymentResponse: + """Create Cserve V2 Deployment + + + :param create_c_serve_v2_deployment_request: (required) + :type create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest + :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_cserve_v2_deployment_deployments_cserve_v2_post_serialize( + create_c_serve_v2_deployment_request=create_c_serve_v2_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_cserve_v2_deployment_deployments_cserve_v2_post_with_http_info( + self, + create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest, + _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[CreateCServeV2DeploymentResponse]: + """Create Cserve V2 Deployment + + + :param create_c_serve_v2_deployment_request: (required) + :type create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest + :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_cserve_v2_deployment_deployments_cserve_v2_post_serialize( + create_c_serve_v2_deployment_request=create_c_serve_v2_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_cserve_v2_deployment_deployments_cserve_v2_post_without_preload_content( + self, + create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest, + _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 Cserve V2 Deployment + + + :param create_c_serve_v2_deployment_request: (required) + :type create_c_serve_v2_deployment_request: CreateCServeV2DeploymentRequest + :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_cserve_v2_deployment_deployments_cserve_v2_post_serialize( + create_c_serve_v2_deployment_request=create_c_serve_v2_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_cserve_v2_deployment_deployments_cserve_v2_post_serialize( + self, + create_c_serve_v2_deployment_request, + _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 create_c_serve_v2_deployment_request is not None: + _body_params = create_c_serve_v2_deployment_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deployments/cserve_v2', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_inference_deployment_deployments_inference_post( + self, + create_inference_deployment_request: CreateInferenceDeploymentRequest, + _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, + ) -> CreateInferenceDeploymentResponse: + """Create Inference Deployment + + + :param create_inference_deployment_request: (required) + :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :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_inference_deployment_deployments_inference_post_serialize( + create_inference_deployment_request=create_inference_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_inference_deployment_deployments_inference_post_with_http_info( + self, + create_inference_deployment_request: CreateInferenceDeploymentRequest, + _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[CreateInferenceDeploymentResponse]: + """Create Inference Deployment + + + :param create_inference_deployment_request: (required) + :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :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_inference_deployment_deployments_inference_post_serialize( + create_inference_deployment_request=create_inference_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_inference_deployment_deployments_inference_post_without_preload_content( + self, + create_inference_deployment_request: CreateInferenceDeploymentRequest, + _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 Deployment + + + :param create_inference_deployment_request: (required) + :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :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_inference_deployment_deployments_inference_post_serialize( + create_inference_deployment_request=create_inference_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_inference_deployment_deployments_inference_post_serialize( + self, + create_inference_deployment_request, + _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 create_inference_deployment_request is not None: + _body_params = create_inference_deployment_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deployments/inference', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_rag_deployment_deployments_rag_post( + self, + create_rag_deployment_request: CreateRagDeploymentRequest, + _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, + ) -> CreateRagDeploymentResponse: + """Create Rag Deployment + + + :param create_rag_deployment_request: (required) + :type create_rag_deployment_request: CreateRagDeploymentRequest + :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_rag_deployment_deployments_rag_post_serialize( + create_rag_deployment_request=create_rag_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_rag_deployment_deployments_rag_post_with_http_info( + self, + create_rag_deployment_request: CreateRagDeploymentRequest, + _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[CreateRagDeploymentResponse]: + """Create Rag Deployment + + + :param create_rag_deployment_request: (required) + :type create_rag_deployment_request: CreateRagDeploymentRequest + :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_rag_deployment_deployments_rag_post_serialize( + create_rag_deployment_request=create_rag_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_rag_deployment_deployments_rag_post_without_preload_content( + self, + create_rag_deployment_request: CreateRagDeploymentRequest, + _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 Rag Deployment + + + :param create_rag_deployment_request: (required) + :type create_rag_deployment_request: CreateRagDeploymentRequest + :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_rag_deployment_deployments_rag_post_serialize( + create_rag_deployment_request=create_rag_deployment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_rag_deployment_deployments_rag_post_serialize( + self, + create_rag_deployment_request, + _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 create_rag_deployment_request is not None: + _body_params = create_rag_deployment_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deployments/rag', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_api_key_credentials_api_key_id_delete( + self, + 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, + ) -> object: + """Delete Api Key + + + :param id: (required) + :type 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_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_api_key_credentials_api_key_id_delete_with_http_info( + self, + 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[object]: + """Delete Api Key + + + :param id: (required) + :type 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_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_api_key_credentials_api_key_id_delete_without_preload_content( + self, + 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 Api Key + + + :param id: (required) + :type 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_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_api_key_credentials_api_key_id_delete_serialize( + self, + 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 id is not None: + _path_params['id'] = 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/credentials/api-key/{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 + def delete_user_vault_item_endpoint_user_vault_delete( + self, + user_vault_item_input: UserVaultItemInput, + _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, + ) -> object: + """Delete User Vault Item Endpoint + + Delete an item of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_delete_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( + self, + user_vault_item_input: UserVaultItemInput, + _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[object]: + """Delete User Vault Item Endpoint + + Delete an item of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_delete_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( + self, + user_vault_item_input: UserVaultItemInput, + _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 User Vault Item Endpoint + + Delete an item of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_delete_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_user_vault_item_endpoint_user_vault_delete_serialize( + self, + user_vault_item_input, + _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 user_vault_item_input is not None: + _body_params = user_vault_item_input + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/user_vault', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_all_user_vault_items_endpoint_user_vault_get( + self, + type: Optional[UserVaultType] = None, + search_query: Optional[StrictStr] = 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, + ) -> ListUserVaultItemsResponse: + """Get All User Vault Items Endpoint + + Retrieve all items of a specific type for the user. + + :param type: + :type type: UserVaultType + :param search_query: + :type search_query: 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_all_user_vault_items_endpoint_user_vault_get_serialize( + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUserVaultItemsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_all_user_vault_items_endpoint_user_vault_get_with_http_info( + self, + type: Optional[UserVaultType] = None, + search_query: Optional[StrictStr] = 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[ListUserVaultItemsResponse]: + """Get All User Vault Items Endpoint + + Retrieve all items of a specific type for the user. + + :param type: + :type type: UserVaultType + :param search_query: + :type search_query: 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_all_user_vault_items_endpoint_user_vault_get_serialize( + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUserVaultItemsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_all_user_vault_items_endpoint_user_vault_get_without_preload_content( + self, + type: Optional[UserVaultType] = None, + search_query: Optional[StrictStr] = 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 All User Vault Items Endpoint + + Retrieve all items of a specific type for the user. + + :param type: + :type type: UserVaultType + :param search_query: + :type search_query: 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_all_user_vault_items_endpoint_user_vault_get_serialize( + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUserVaultItemsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_all_user_vault_items_endpoint_user_vault_get_serialize( + self, + type, + search_query, + _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 type is not None: + + _query_params.append(('type', type.value)) + + if search_query is not None: + + _query_params.append(('search_query', search_query)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/user_vault', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_api_keys_credentials_api_key_get( + 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, + ) -> ListAPIKeyResponse: + """Get Api Keys + + + :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_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_api_keys_credentials_api_key_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)] + ] + ] = 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[ListAPIKeyResponse]: + """Get Api Keys + + + :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_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_api_keys_credentials_api_key_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)] + ] + ] = 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 Api Keys + + + :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_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_api_keys_credentials_api_key_get_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 + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/credentials/api-key', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_clusters_clusters_get( + 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, + ) -> ListGetClusterResponse: + """Get Clusters + + + :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_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_clusters_clusters_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)] + ] + ] = 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[ListGetClusterResponse]: + """Get Clusters + + + :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_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_clusters_clusters_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)] + ] + ] = 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 Clusters + + + :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_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_clusters_clusters_get_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 + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/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 + def get_compute_deployment_deployments_compute_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> GetComputeDeploymentResponse: + """Get Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_compute_deployment_deployments_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_compute_deployment_deployments_compute_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[GetComputeDeploymentResponse]: + """Get Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_compute_deployment_deployments_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_compute_deployment_deployments_compute_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_compute_deployment_deployments_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_compute_deployment_deployments_compute_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/compute/{deployment_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 + def get_credits_credits_get( + 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, + ) -> CreditsResponse: + """Get Credits + + + :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_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_credits_credits_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)] + ] + ] = 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[CreditsResponse]: + """Get Credits + + + :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_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_credits_credits_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)] + ] + ] = 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 Credits + + + :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_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_credits_credits_get_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 + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/credits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_cserve_deployment_deployments_cserve_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> GetCServeDeploymentResponse: + """Get Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_deployment_deployments_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cserve_deployment_deployments_cserve_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[GetCServeDeploymentResponse]: + """Get Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_deployment_deployments_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cserve_deployment_deployments_cserve_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_deployment_deployments_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/cserve/{deployment_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 + def get_cserve_recipe_deployments_cserve_recipes_get( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = 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, + ) -> ListCServeRecipeResponse: + """Get Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: 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_cserve_recipe_deployments_cserve_recipes_get_serialize( + model=model, + 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': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cserve_recipe_deployments_cserve_recipes_get_with_http_info( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = 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[ListCServeRecipeResponse]: + """Get Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: 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_cserve_recipe_deployments_cserve_recipes_get_serialize( + model=model, + 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': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cserve_recipe_deployments_cserve_recipes_get_without_preload_content( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = 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 Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: 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_cserve_recipe_deployments_cserve_recipes_get_serialize( + model=model, + 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': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cserve_recipe_deployments_cserve_recipes_get_serialize( + self, + model, + 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 + # process the query parameters + if model is not None: + + _query_params.append(('model', model)) + + if cluster_id is not None: + + _query_params.append(('cluster_id', cluster_id)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/cserve/recipes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> GetCServeV2DeploymentResponse: + """Get Cserve V2 Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[GetCServeV2DeploymentResponse]: + """Get Cserve V2 Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Cserve V2 Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/cserve_v2/{deployment_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 + def get_deployment_logs_deployments_logs_deployment_id_get( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = 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, + ) -> GetDeploymentLogResponse: + """Get Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: 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_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = 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[GetDeploymentLogResponse]: + """Get Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: 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_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = 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 Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: 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_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( + self, + deployment_id, + start_time, + end_time, + next_page_token, + _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 deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + if next_page_token is not None: + + _query_params.append(('next_page_token', next_page_token)) + + if start_time is not None: + + _query_params.append(('start_time', start_time)) + + if end_time is not None: + + _query_params.append(('end_time', end_time)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/logs/{deployment_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 + def get_deployment_status_deployments_status_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> DeploymentStatusResponse: + """Get Deployment Status + + + :param deployment_id: (required) + :type deployment_id: 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_deployment_status_deployments_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_deployment_status_deployments_status_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[DeploymentStatusResponse]: + """Get Deployment Status + + + :param deployment_id: (required) + :type deployment_id: 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_deployment_status_deployments_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_deployment_status_deployments_status_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Deployment Status + + + :param deployment_id: (required) + :type deployment_id: 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_deployment_status_deployments_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_deployment_status_deployments_status_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/status/{deployment_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 + def get_deployments_deployments_get( + self, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = 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, + ) -> ListGetDeploymentResponse: + """Get Deployments + + + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: 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_deployments_deployments_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_deployments_deployments_get_with_http_info( + self, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = 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[ListGetDeploymentResponse]: + """Get Deployments + + + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: 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_deployments_deployments_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_deployments_deployments_get_without_preload_content( + self, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = 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 Deployments + + + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: 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_deployments_deployments_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_deployments_deployments_get_serialize( + self, + offset, + limit, + type, + search_query, + _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 offset is not None: + + _query_params.append(('offset', offset)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if type is not None: + + _query_params.append(('type', type.value)) + + if search_query is not None: + + _query_params.append(('search_query', search_query)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_hardware_instances_hardware_instances_get( + self, + cluster_id: Optional[StrictInt] = 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, + ) -> ListHardwareInstanceResponse: + """Get Hardware Instances + + + :param cluster_id: + :type cluster_id: 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_hardware_instances_hardware_instances_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': "ListHardwareInstanceResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_hardware_instances_hardware_instances_get_with_http_info( + self, + cluster_id: Optional[StrictInt] = 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[ListHardwareInstanceResponse]: + """Get Hardware Instances + + + :param cluster_id: + :type cluster_id: 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_hardware_instances_hardware_instances_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': "ListHardwareInstanceResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_hardware_instances_hardware_instances_get_without_preload_content( + self, + cluster_id: Optional[StrictInt] = 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 Hardware Instances + + + :param cluster_id: + :type cluster_id: 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_hardware_instances_hardware_instances_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': "ListHardwareInstanceResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_hardware_instances_hardware_instances_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 + # process the query parameters + if cluster_id is not None: + + _query_params.append(('cluster_id', cluster_id)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/hardware-instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_inference_deployment_deployments_inference_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> GetInferenceDeploymentResponse: + """Get Inference Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_inference_deployment_deployments_inference_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_inference_deployment_deployments_inference_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[GetInferenceDeploymentResponse]: + """Get Inference Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_inference_deployment_deployments_inference_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_inference_deployment_deployments_inference_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_inference_deployment_deployments_inference_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInferenceDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/inference/{deployment_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 + def get_payments_payments_get( + self, + limit: Optional[StrictInt] = None, + starting_after: Optional[StrictStr] = 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, + ) -> GetPaymentsResponse: + """Get Payments + + + :param limit: + :type limit: int + :param starting_after: + :type starting_after: 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_payments_payments_get_serialize( + limit=limit, + starting_after=starting_after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPaymentsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_payments_payments_get_with_http_info( + self, + limit: Optional[StrictInt] = None, + starting_after: Optional[StrictStr] = 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[GetPaymentsResponse]: + """Get Payments + + + :param limit: + :type limit: int + :param starting_after: + :type starting_after: 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_payments_payments_get_serialize( + limit=limit, + starting_after=starting_after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPaymentsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_payments_payments_get_without_preload_content( + self, + limit: Optional[StrictInt] = None, + starting_after: Optional[StrictStr] = 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 Payments + + + :param limit: + :type limit: int + :param starting_after: + :type starting_after: 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_payments_payments_get_serialize( + limit=limit, + starting_after=starting_after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPaymentsResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_payments_payments_get_serialize( + self, + limit, + starting_after, + _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 limit is not None: + + _query_params.append(('limit', limit)) + + if starting_after is not None: + + _query_params.append(('starting_after', starting_after)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/payments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_prebuilt_images_prebuilt_images_get( + self, + type: Optional[DeploymentType] = 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, + ) -> ListPrebuiltImageResponse: + """Get Prebuilt Images + + + :param type: + :type type: DeploymentType + :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_prebuilt_images_prebuilt_images_get_serialize( + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_prebuilt_images_prebuilt_images_get_with_http_info( + self, + type: Optional[DeploymentType] = 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[ListPrebuiltImageResponse]: + """Get Prebuilt Images + + + :param type: + :type type: DeploymentType + :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_prebuilt_images_prebuilt_images_get_serialize( + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_prebuilt_images_prebuilt_images_get_without_preload_content( + self, + type: Optional[DeploymentType] = 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 Prebuilt Images + + + :param type: + :type type: DeploymentType + :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_prebuilt_images_prebuilt_images_get_serialize( + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_prebuilt_images_prebuilt_images_get_serialize( + self, + type, + _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 type is not None: + + _query_params.append(('type', type.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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/prebuilt-images', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_rag_deployment_deployments_rag_deployment_id_get( + self, + deployment_id: StrictInt, + _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, + ) -> GetRagDeploymentResponse: + """Get Rag Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_rag_deployment_deployments_rag_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_rag_deployment_deployments_rag_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _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[GetRagDeploymentResponse]: + """Get Rag Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_rag_deployment_deployments_rag_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_rag_deployment_deployments_rag_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _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 Rag Deployment + + + :param deployment_id: (required) + :type deployment_id: 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_rag_deployment_deployments_rag_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetRagDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_rag_deployment_deployments_rag_deployment_id_get_serialize( + self, + deployment_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 deployment_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/rag/{deployment_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 + def get_usage_daily_bills_get( + self, + start_date: date, + end_date: date, + _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, + ) -> ListDailyBillResponse: + """Get Usage + + + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date + :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_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDailyBillResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_usage_daily_bills_get_with_http_info( + self, + start_date: date, + end_date: date, + _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[ListDailyBillResponse]: + """Get Usage + + + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date + :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_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDailyBillResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_usage_daily_bills_get_without_preload_content( + self, + start_date: date, + end_date: date, + _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 Usage + + + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date + :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_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDailyBillResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_usage_daily_bills_get_serialize( + self, + start_date, + end_date, + _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 start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'start_date', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('start_date', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'end_date', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('end_date', end_date)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/daily_bills', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_usage_deployments_usage_deployment_id_get( + self, + deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = 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, + ) -> GetDeploymentUsageResponse: + """Get Usage + + + :param deployment_id: (required) + :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: 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_usage_deployments_usage_deployment_id_get_serialize( + deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentUsageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_usage_deployments_usage_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = 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[GetDeploymentUsageResponse]: + """Get Usage + + + :param deployment_id: (required) + :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: 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_usage_deployments_usage_deployment_id_get_serialize( + deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentUsageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_usage_deployments_usage_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = 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 Usage + + + :param deployment_id: (required) + :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: 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_usage_deployments_usage_deployment_id_get_serialize( + deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentUsageResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_usage_deployments_usage_deployment_id_get_serialize( + self, + deployment_id, + metric, + duration, + end_time, + _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 deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + if metric is not None: + + _query_params.append(('metric', metric.value)) + + if duration is not None: + + _query_params.append(('duration', duration)) + + if end_time is not None: + + _query_params.append(('end_time', end_time)) + + # process the header parameters + # process the form parameters + # process the 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/usage/{deployment_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 + def setup_stripe_customer_payments_setup_post( + 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, + ) -> object: + """Setup Stripe Customer + + + :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._setup_stripe_customer_payments_setup_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def setup_stripe_customer_payments_setup_post_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[object]: + """Setup Stripe Customer + + + :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._setup_stripe_customer_payments_setup_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def setup_stripe_customer_payments_setup_post_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: + """Setup Stripe Customer + + + :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._setup_stripe_customer_payments_setup_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _setup_stripe_customer_payments_setup_post_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 + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/setup', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_deployment_status_deployments_status_deployment_id_put( + self, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, + _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, + ) -> DeploymentStatusResponse: + """Update Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest + :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_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_deployment_status_deployments_status_deployment_id_put_with_http_info( + self, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, + _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[DeploymentStatusResponse]: + """Update Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest + :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_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_deployment_status_deployments_status_deployment_id_put_without_preload_content( + self, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, + _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 Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest + :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_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_deployment_status_deployments_status_deployment_id_put_serialize( + self, + deployment_id, + deployment_status_request, + _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 deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if deployment_status_request is not None: + _body_params = deployment_status_request + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/deployments/status/{deployment_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 + def update_user_vault_item_endpoint_user_vault_put( + self, + user_vault_item_input: UserVaultItemInput, + _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, + ) -> object: + """Update User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_user_vault_item_endpoint_user_vault_put_with_http_info( + self, + user_vault_item_input: UserVaultItemInput, + _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[object]: + """Update User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_user_vault_item_endpoint_user_vault_put_without_preload_content( + self, + user_vault_item_input: UserVaultItemInput, + _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 User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item_input: (required) + :type user_vault_item_input: UserVaultItemInput + :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_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item_input=user_vault_item_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_user_vault_item_endpoint_user_vault_put_serialize( + self, + user_vault_item_input, + _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 user_vault_item_input is not None: + _body_params = user_vault_item_input + + + # 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] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/user_vault', + 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/platform_api_python_client/platform_api_python_client/api_client.py b/platform_api_python_client/platform_api_python_client/api_client.py new file mode 100644 index 0000000..3aff335 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/api_client.py @@ -0,0 +1,797 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + 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 +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from platform_api_python_client.configuration import Configuration +from platform_api_python_client.api_response import ApiResponse, T as ApiResponseT +import platform_api_python_client.models +from platform_api_python_client import rest +from platform_api_python_client.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + 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, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, 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 + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=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. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if 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) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + 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) + ) + + # 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 + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # 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 += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + 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. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to 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 found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + 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') + 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" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + 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 + ) + 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 + 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__ + + 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. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + 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): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + 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] + + 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()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(platform_api_python_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + 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': + 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 = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + 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)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + 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])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + 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 + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if 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 + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + 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'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/platform_api_python_client/platform_api_python_client/api_response.py b/platform_api_python_client/platform_api_python_client/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +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 + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + 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 + } diff --git a/platform_api_python_client/platform_api_python_client/configuration.py b/platform_api_python_client/platform_api_python_client/configuration.py new file mode 100644 index 0000000..8dad8b3 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/configuration.py @@ -0,0 +1,458 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None + ) -> None: + """Constructor + """ + self._base_path = "http://localhost" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("platform_api_python_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + 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'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['HTTPBearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + 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']) + + 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'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/platform_api_python_client/platform_api_python_client/exceptions.py b/platform_api_python_client/platform_api_python_client/exceptions.py new file mode 100644 index 0000000..f84f87e --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + 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 + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + 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) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/platform_api_python_client/platform_api_python_client/models/__init__.py b/platform_api_python_client/platform_api_python_client/models/__init__.py new file mode 100644 index 0000000..1345003 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/__init__.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +# flake8: noqa +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.c_serve_recipe import CServeRecipe +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse +from platform_api_python_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from platform_api_python_client.models.user_vault_type import UserVaultType +from platform_api_python_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/platform_api_python_client/models/api_key_request.py b/platform_api_python_client/platform_api_python_client/models/api_key_request.py new file mode 100644 index 0000000..50d4f3f --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/api_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class APIKeyRequest(BaseModel): + """ + APIKeyRequest + """ # noqa: E501 + name: StrictStr + __properties: ClassVar[List[str]] = ["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 APIKeyRequest 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 APIKeyRequest 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") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/api_key_response.py b/platform_api_python_client/platform_api_python_client/models/api_key_response.py new file mode 100644 index 0000000..09f8f58 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/api_key_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class APIKeyResponse(BaseModel): + """ + APIKeyResponse + """ # noqa: E501 + name: StrictStr + id: StrictStr + created_at: datetime + __properties: ClassVar[List[str]] = ["name", "id", "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 APIKeyResponse 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 APIKeyResponse 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"), + "id": obj.get("id"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_recipe.py b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe.py new file mode 100644 index 0000000..2c9a019 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipe(BaseModel): + """ + Base class for deployment planner + """ # noqa: E501 + model: StrictStr + is_embedding_model: Optional[StrictBool] = False + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + block_size: Optional[StrictInt] = 32 + swap_space: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0 + gpu_mem_util: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = 0.95 + max_num_seqs: Optional[StrictInt] = 256 + offloading_num: Optional[StrictInt] = 0 + use_prefix_caching: Optional[StrictBool] = None + use_chunked_prefill: Optional[StrictBool] = None + chunked_prefill_size: Optional[StrictInt] = None + eager_execution: Optional[StrictBool] = None + num_scheduler_steps: Optional[StrictInt] = None + use_flashinfer: Optional[StrictBool] = False + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] = None + dtype: Optional[StrictStr] = 'auto' + tokenizer: Optional[StrictStr] = None + spec_proposer: Optional[StrictStr] = None + spec_draft_model: Optional[StrictStr] = None + spec_tokens: Optional[StrictInt] = None + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + seed: Optional[StrictInt] = 0 + __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] + + @field_validator('block_size') + def block_size_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([16, 32]): + raise ValueError("must be one of enum values (16, 32)") + return value + + @field_validator('dtype') + def dtype_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'float16', 'float32', 'bfloat16']): + raise ValueError("must be one of enum values ('auto', 'float16', 'float32', 'bfloat16')") + return value + + @field_validator('spec_proposer') + def spec_proposer_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'prompt_lookup']): + raise ValueError("must be one of enum values ('draft', 'prompt_lookup')") + 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 CServeRecipe 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 use_prefix_caching (nullable) is None + # and model_fields_set contains the field + if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: + _dict['use_prefix_caching'] = None + + # set to None if use_chunked_prefill (nullable) is None + # and model_fields_set contains the field + if self.use_chunked_prefill is None and "use_chunked_prefill" in self.model_fields_set: + _dict['use_chunked_prefill'] = None + + # set to None if chunked_prefill_size (nullable) is None + # and model_fields_set contains the field + if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: + _dict['chunked_prefill_size'] = None + + # set to None if eager_execution (nullable) is None + # and model_fields_set contains the field + if self.eager_execution is None and "eager_execution" in self.model_fields_set: + _dict['eager_execution'] = None + + # set to None if num_scheduler_steps (nullable) is None + # and model_fields_set contains the field + if self.num_scheduler_steps is None and "num_scheduler_steps" in self.model_fields_set: + _dict['num_scheduler_steps'] = None + + # set to None if max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # set to None if tokenizer (nullable) is None + # and model_fields_set contains the field + if self.tokenizer is None and "tokenizer" in self.model_fields_set: + _dict['tokenizer'] = None + + # set to None if spec_proposer (nullable) is None + # and model_fields_set contains the field + if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: + _dict['spec_proposer'] = None + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "use_prefix_caching": obj.get("use_prefix_caching"), + "use_chunked_prefill": obj.get("use_chunked_prefill"), + "chunked_prefill_size": obj.get("chunked_prefill_size"), + "eager_execution": obj.get("eager_execution"), + "num_scheduler_steps": obj.get("num_scheduler_steps"), + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "max_model_len": obj.get("max_model_len"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "tokenizer": obj.get("tokenizer"), + "spec_proposer": obj.get("spec_proposer"), + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "seed": obj.get("seed") if obj.get("seed") is not None else 0 + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_perf.py b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_perf.py new file mode 100644 index 0000000..af21d46 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_perf.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipePerf(BaseModel): + """ + CServeRecipePerf + """ # noqa: E501 + recipe: CServeV2RecipeOutput + hardware_instance_id: StrictInt + output_tp: List[Annotated[List[Any], Field(min_length=2, max_length=2)]] + mean_ttft: List[Annotated[List[Any], Field(min_length=2, max_length=2)]] + __properties: ClassVar[List[str]] = ["recipe", "hardware_instance_id", "output_tp", "mean_ttft"] + + 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 CServeRecipePerf 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipePerf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hardware_instance_id": obj.get("hardware_instance_id"), + "output_tp": obj.get("output_tp"), + "mean_ttft": obj.get("mean_ttft") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_response.py b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_response.py new file mode 100644 index 0000000..64882ce --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_recipe_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipeResponse(BaseModel): + """ + CServeRecipeResponse + """ # noqa: E501 + model: StrictStr + cluster_id: StrictInt + fastest: CServeRecipePerf + cheapest: CServeRecipePerf + best_value: CServeRecipePerf + __properties: ClassVar[List[str]] = ["model", "cluster_id", "fastest", "cheapest", "best_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 CServeRecipeResponse 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 fastest + if self.fastest: + _dict['fastest'] = self.fastest.to_dict() + # override the default output from pydantic by calling `to_dict()` of cheapest + if self.cheapest: + _dict['cheapest'] = self.cheapest.to_dict() + # override the default output from pydantic by calling `to_dict()` of best_value + if self.best_value: + _dict['best_value'] = self.best_value.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "cluster_id": obj.get("cluster_id"), + "fastest": CServeRecipePerf.from_dict(obj["fastest"]) if obj.get("fastest") is not None else None, + "cheapest": CServeRecipePerf.from_dict(obj["cheapest"]) if obj.get("cheapest") is not None else None, + "best_value": CServeRecipePerf.from_dict(obj["best_value"]) if obj.get("best_value") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe.py b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe.py new file mode 100644 index 0000000..cc1cc87 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CServeV2Recipe(BaseModel): + """ + Inputs to start deployment + """ # noqa: E501 + model: StrictStr + max_model_len: Optional[StrictInt] + is_embedding_model: StrictBool + tokenizer: StrictStr + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + gpu_mem_util: Union[StrictFloat, StrictInt] + block_size: StrictInt + swap_space: StrictInt + quantization: Optional[StrictStr] + dtype: StrictStr + cache_dtype: StrictStr + max_num_seqs: StrictInt + eager_execution: StrictBool + use_flashinfer: StrictBool + offloading_num: Union[StrictFloat, StrictInt] + spec_draft_model: Optional[StrictStr] + spec_tokens: Optional[StrictInt] + spec_prompt_lookup_max: Optional[StrictInt] + spec_prompt_lookup_min: Optional[StrictInt] + use_prefix_caching: StrictBool + use_chunked_prefill: StrictBool + chunked_prefill_size: Optional[StrictInt] + max_seq_len_to_capture: StrictInt + distributed_executor_backend: StrictStr + spec_max_batch_size: Optional[StrictInt] + spec_max_seq_len: Optional[StrictInt] + num_scheduler_steps: StrictInt + __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + + 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 CServeV2Recipe 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 max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # 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 + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if chunked_prefill_size (nullable) is None + # and model_fields_set contains the field + if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: + _dict['chunked_prefill_size'] = None + + # set to None if spec_max_batch_size (nullable) is None + # and model_fields_set contains the field + if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: + _dict['spec_max_batch_size'] = None + + # set to None if spec_max_seq_len (nullable) is None + # and model_fields_set contains the field + if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: + _dict['spec_max_seq_len'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeV2Recipe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "max_model_len": obj.get("max_model_len"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tokenizer": obj.get("tokenizer"), + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "quantization": obj.get("quantization"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, + "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, + "chunked_prefill_size": obj.get("chunked_prefill_size"), + "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 1024, + "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'ray', + "spec_max_batch_size": obj.get("spec_max_batch_size"), + "spec_max_seq_len": obj.get("spec_max_seq_len"), + "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_input.py b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_input.py new file mode 100644 index 0000000..0c3a2b5 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_input.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CServeV2RecipeInput(BaseModel): + """ + Inputs to start deployment + """ # noqa: E501 + model: StrictStr + max_model_len: Optional[StrictInt] = None + is_embedding_model: Optional[StrictBool] = False + tokenizer: StrictStr + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + gpu_mem_util: Optional[Union[StrictFloat, StrictInt]] = 0.95 + block_size: Optional[StrictInt] = 16 + swap_space: Optional[StrictInt] = 0 + quantization: Optional[StrictStr] = None + dtype: Optional[StrictStr] = 'auto' + cache_dtype: Optional[StrictStr] = 'auto' + max_num_seqs: Optional[StrictInt] = 256 + eager_execution: Optional[StrictBool] = True + use_flashinfer: Optional[StrictBool] = False + offloading_num: Optional[Union[StrictFloat, StrictInt]] = 0 + spec_draft_model: Optional[StrictStr] = None + spec_tokens: Optional[StrictInt] = None + spec_prompt_lookup_max: Optional[StrictInt] = None + spec_prompt_lookup_min: Optional[StrictInt] = None + use_prefix_caching: Optional[StrictBool] = False + use_chunked_prefill: Optional[StrictBool] = False + chunked_prefill_size: Optional[StrictInt] = None + max_seq_len_to_capture: Optional[StrictInt] = 8192 + distributed_executor_backend: Optional[StrictStr] = 'mp' + spec_max_batch_size: Optional[StrictInt] = None + spec_max_seq_len: Optional[StrictInt] = None + num_scheduler_steps: Optional[StrictInt] = 1 + __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + + 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 CServeV2RecipeInput 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 max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # 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 + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if chunked_prefill_size (nullable) is None + # and model_fields_set contains the field + if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: + _dict['chunked_prefill_size'] = None + + # set to None if spec_max_batch_size (nullable) is None + # and model_fields_set contains the field + if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: + _dict['spec_max_batch_size'] = None + + # set to None if spec_max_seq_len (nullable) is None + # and model_fields_set contains the field + if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: + _dict['spec_max_seq_len'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeV2RecipeInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "max_model_len": obj.get("max_model_len"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tokenizer": obj.get("tokenizer"), + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 16, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "quantization": obj.get("quantization"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, + "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, + "chunked_prefill_size": obj.get("chunked_prefill_size"), + "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 8192, + "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'mp', + "spec_max_batch_size": obj.get("spec_max_batch_size"), + "spec_max_seq_len": obj.get("spec_max_seq_len"), + "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_output.py b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_output.py new file mode 100644 index 0000000..1b001f1 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/c_serve_v2_recipe_output.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CServeV2RecipeOutput(BaseModel): + """ + Inputs to start deployment + """ # noqa: E501 + model: StrictStr + max_model_len: Optional[StrictInt] + is_embedding_model: StrictBool + tokenizer: StrictStr + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + gpu_mem_util: Union[StrictFloat, StrictInt] + block_size: StrictInt + swap_space: StrictInt + quantization: Optional[StrictStr] + dtype: StrictStr + cache_dtype: StrictStr + max_num_seqs: StrictInt + eager_execution: StrictBool + use_flashinfer: StrictBool + offloading_num: Union[StrictFloat, StrictInt] + spec_draft_model: Optional[StrictStr] + spec_tokens: Optional[StrictInt] + spec_prompt_lookup_max: Optional[StrictInt] + spec_prompt_lookup_min: Optional[StrictInt] + use_prefix_caching: StrictBool + use_chunked_prefill: StrictBool + chunked_prefill_size: Optional[StrictInt] + max_seq_len_to_capture: StrictInt + distributed_executor_backend: StrictStr + spec_max_batch_size: Optional[StrictInt] + spec_max_seq_len: Optional[StrictInt] + num_scheduler_steps: StrictInt + __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + + 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 CServeV2RecipeOutput 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 max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # 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 + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if chunked_prefill_size (nullable) is None + # and model_fields_set contains the field + if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: + _dict['chunked_prefill_size'] = None + + # set to None if spec_max_batch_size (nullable) is None + # and model_fields_set contains the field + if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: + _dict['spec_max_batch_size'] = None + + # set to None if spec_max_seq_len (nullable) is None + # and model_fields_set contains the field + if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: + _dict['spec_max_seq_len'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeV2RecipeOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "max_model_len": obj.get("max_model_len"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tokenizer": obj.get("tokenizer"), + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 16, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "quantization": obj.get("quantization"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, + "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, + "chunked_prefill_size": obj.get("chunked_prefill_size"), + "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 8192, + "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'mp', + "spec_max_batch_size": obj.get("spec_max_batch_size"), + "spec_max_seq_len": obj.get("spec_max_seq_len"), + "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_request.py b/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_request.py new file mode 100644 index 0000000..597e41c --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_request.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from platform_api_python_client.models.c_serve_recipe import CServeRecipe +from typing import Optional, Set +from typing_extensions import Self + +class CreateCServeDeploymentRequest(BaseModel): + """ + CreateCServeDeploymentRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=12)] + cluster_id: StrictInt + hardware_instance_id: StrictInt + recipe: CServeRecipe + hf_token: Optional[StrictStr] = None + endpoint_certificate_authority: Optional[StrictStr] = None + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] + + 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 CreateCServeDeploymentRequest 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if hf_token (nullable) is None + # and model_fields_set contains the field + if self.hf_token is None and "hf_token" in self.model_fields_set: + _dict['hf_token'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCServeDeploymentRequest 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"), + "cluster_id": obj.get("cluster_id"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "recipe": CServeRecipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hf_token": obj.get("hf_token"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_response.py new file mode 100644 index 0000000..f33fb54 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_c_serve_deployment_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateCServeDeploymentResponse(BaseModel): + """ + CreateCServeDeploymentResponse + """ # noqa: E501 + id: StrictInt + created_at: datetime + endpoint_url: StrictStr + __properties: ClassVar[List[str]] = ["id", "created_at", "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 CreateCServeDeploymentResponse 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 CreateCServeDeploymentResponse 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"), + "created_at": obj.get("created_at"), + "endpoint_url": obj.get("endpoint_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_request.py b/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_request.py new file mode 100644 index 0000000..11a914a --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_request.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from typing import Optional, Set +from typing_extensions import Self + +class CreateCServeV2DeploymentRequest(BaseModel): + """ + CreateCServeV2DeploymentRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=12)] + cluster_id: StrictInt + hardware_instance_id: StrictInt + recipe: CServeV2RecipeInput + hf_token: Optional[StrictStr] = None + endpoint_certificate_authority: Optional[StrictStr] = None + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] + + 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 CreateCServeV2DeploymentRequest 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if hf_token (nullable) is None + # and model_fields_set contains the field + if self.hf_token is None and "hf_token" in self.model_fields_set: + _dict['hf_token'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCServeV2DeploymentRequest 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"), + "cluster_id": obj.get("cluster_id"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "recipe": CServeV2RecipeInput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hf_token": obj.get("hf_token"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_response.py new file mode 100644 index 0000000..46b471b --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_c_serve_v2_deployment_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateCServeV2DeploymentResponse(BaseModel): + """ + CreateCServeV2DeploymentResponse + """ # noqa: E501 + id: StrictInt + created_at: datetime + endpoint_url: StrictStr + __properties: ClassVar[List[str]] = ["id", "created_at", "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 CreateCServeV2DeploymentResponse 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 CreateCServeV2DeploymentResponse 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"), + "created_at": obj.get("created_at"), + "endpoint_url": obj.get("endpoint_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_checkout_request.py b/platform_api_python_client/platform_api_python_client/models/create_checkout_request.py new file mode 100644 index 0000000..c3ecdce --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_checkout_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 Optional, Set +from typing_extensions import Self + +class CreateCheckoutRequest(BaseModel): + """ + CreateCheckoutRequest + """ # noqa: E501 + amount_credits: StrictInt + success_url: StrictStr + __properties: ClassVar[List[str]] = ["amount_credits", "success_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 CreateCheckoutRequest 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 CreateCheckoutRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount_credits": obj.get("amount_credits"), + "success_url": obj.get("success_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_checkout_response.py b/platform_api_python_client/platform_api_python_client/models/create_checkout_response.py new file mode 100644 index 0000000..49e270a --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_checkout_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateCheckoutResponse(BaseModel): + """ + CreateCheckoutResponse + """ # noqa: E501 + url: StrictStr + __properties: ClassVar[List[str]] = ["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 CreateCheckoutResponse 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 CreateCheckoutResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_request.py b/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_request.py new file mode 100644 index 0000000..8216f04 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateComputeDeploymentRequest(BaseModel): + """ + CreateComputeDeploymentRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=12)] + cluster_id: StrictInt + hardware_instance_id: StrictInt + image_url: StrictStr + enable_jupyter: Optional[StrictBool] = False + ssh_public_key: Optional[StrictStr] = None + ssh_password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "enable_jupyter", "ssh_public_key", "ssh_password"] + + 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 CreateComputeDeploymentRequest 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 ssh_public_key (nullable) is None + # and model_fields_set contains the field + if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set: + _dict['ssh_public_key'] = None + + # set to None if ssh_password (nullable) is None + # and model_fields_set contains the field + if self.ssh_password is None and "ssh_password" in self.model_fields_set: + _dict['ssh_password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateComputeDeploymentRequest 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"), + "cluster_id": obj.get("cluster_id"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "image_url": obj.get("image_url"), + "enable_jupyter": obj.get("enable_jupyter") if obj.get("enable_jupyter") is not None else False, + "ssh_public_key": obj.get("ssh_public_key"), + "ssh_password": obj.get("ssh_password") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_response.py new file mode 100644 index 0000000..9609798 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_compute_deployment_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateComputeDeploymentResponse(BaseModel): + """ + CreateComputeDeploymentResponse + """ # noqa: E501 + id: StrictInt + created_at: datetime + endpoint_url: StrictStr + port: StrictInt + jupyter_token: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port", "jupyter_token"] + + 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 CreateComputeDeploymentResponse 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 jupyter_token (nullable) is None + # and model_fields_set contains the field + if self.jupyter_token is None and "jupyter_token" in self.model_fields_set: + _dict['jupyter_token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateComputeDeploymentResponse 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"), + "created_at": obj.get("created_at"), + "endpoint_url": obj.get("endpoint_url"), + "port": obj.get("port"), + "jupyter_token": obj.get("jupyter_token") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_request.py b/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_request.py new file mode 100644 index 0000000..d2ac903 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateInferenceDeploymentRequest(BaseModel): + """ + CreateInferenceDeploymentRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=12)] + cluster_id: StrictInt + hardware_instance_id: StrictInt + image_url: StrictStr + port: StrictInt + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] = None + healthcheck: Optional[StrictStr] = None + env_vars: Optional[Dict[str, StrictStr]] = None + command: Optional[List[StrictStr]] = None + command_args: Optional[List[StrictStr]] = None + endpoint_certificate_authority: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "command_args", "endpoint_certificate_authority"] + + 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 CreateInferenceDeploymentRequest 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 concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = 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 + + # set to None if env_vars (nullable) is None + # and model_fields_set contains the field + if self.env_vars is None and "env_vars" in self.model_fields_set: + _dict['env_vars'] = None + + # set to None if command (nullable) is None + # and model_fields_set contains the field + if self.command is None and "command" in self.model_fields_set: + _dict['command'] = None + + # set to None if command_args (nullable) is None + # and model_fields_set contains the field + if self.command_args is None and "command_args" in self.model_fields_set: + _dict['command_args'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInferenceDeploymentRequest 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"), + "cluster_id": obj.get("cluster_id"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "image_url": obj.get("image_url"), + "port": obj.get("port"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), + "healthcheck": obj.get("healthcheck"), + "env_vars": obj.get("env_vars"), + "command": obj.get("command"), + "command_args": obj.get("command_args"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_response.py new file mode 100644 index 0000000..705965f --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_inference_deployment_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateInferenceDeploymentResponse(BaseModel): + """ + CreateInferenceDeploymentResponse + """ # noqa: E501 + id: StrictInt + created_at: datetime + endpoint_url: StrictStr + __properties: ClassVar[List[str]] = ["id", "created_at", "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 CreateInferenceDeploymentResponse 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 CreateInferenceDeploymentResponse 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"), + "created_at": obj.get("created_at"), + "endpoint_url": obj.get("endpoint_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_request.py b/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_request.py new file mode 100644 index 0000000..709870a --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from typing import Optional, Set +from typing_extensions import Self + +class CreateRagDeploymentRequest(BaseModel): + """ + CreateRagDeploymentRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=12)] + cluster_id: StrictInt + hardware_instance_id: StrictInt + recipe: CServeV2RecipeInput + hf_token: Optional[StrictStr] = None + centml_api_key: StrictStr + min_scale: Optional[StrictInt] = 1 + max_scale: Optional[StrictInt] = 1 + endpoint_certificate_authority: Optional[StrictStr] = None + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + + 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 CreateRagDeploymentRequest 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if hf_token (nullable) is None + # and model_fields_set contains the field + if self.hf_token is None and "hf_token" in self.model_fields_set: + _dict['hf_token'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRagDeploymentRequest 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"), + "cluster_id": obj.get("cluster_id"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "recipe": CServeV2RecipeInput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hf_token": obj.get("hf_token"), + "centml_api_key": obj.get("centml_api_key"), + "min_scale": obj.get("min_scale") if obj.get("min_scale") is not None else 1, + "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_response.py new file mode 100644 index 0000000..6272944 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/create_rag_deployment_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateRagDeploymentResponse(BaseModel): + """ + CreateRagDeploymentResponse + """ # noqa: E501 + id: StrictInt + created_at: datetime + endpoint_url: StrictStr + __properties: ClassVar[List[str]] = ["id", "created_at", "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 CreateRagDeploymentResponse 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 CreateRagDeploymentResponse 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"), + "created_at": obj.get("created_at"), + "endpoint_url": obj.get("endpoint_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/credits_response.py b/platform_api_python_client/platform_api_python_client/models/credits_response.py new file mode 100644 index 0000000..39456fa --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/credits_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class CreditsResponse(BaseModel): + """ + CreditsResponse + """ # noqa: E501 + credits: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["credits"] + + 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 CreditsResponse 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 CreditsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credits": obj.get("credits") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/daily_bill_response.py b/platform_api_python_client/platform_api_python_client/models/daily_bill_response.py new file mode 100644 index 0000000..c3664e4 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/daily_bill_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DailyBillResponse(BaseModel): + """ + DailyBillResponse + """ # noqa: E501 + var_date: date = Field(alias="date") + credits: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["date", "credits"] + + 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 DailyBillResponse 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 DailyBillResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "credits": obj.get("credits") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/deployment_status.py b/platform_api_python_client/platform_api_python_client/models/deployment_status.py new file mode 100644 index 0000000..cf65687 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/deployment_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 DeploymentStatus(str, Enum): + """ + DeploymentStatus + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + PAUSED = 'paused' + DELETED = 'deleted' + + @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/platform_api_python_client/platform_api_python_client/models/deployment_status_request.py b/platform_api_python_client/platform_api_python_client/models/deployment_status_request.py new file mode 100644 index 0000000..c93eeb2 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/deployment_status_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.deployment_status import DeploymentStatus +from typing import Optional, Set +from typing_extensions import Self + +class DeploymentStatusRequest(BaseModel): + """ + DeploymentStatusRequest + """ # noqa: E501 + status: DeploymentStatus + __properties: ClassVar[List[str]] = ["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 DeploymentStatusRequest 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 DeploymentStatusRequest 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") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/deployment_status_response.py b/platform_api_python_client/platform_api_python_client/models/deployment_status_response.py new file mode 100644 index 0000000..5f8740f --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/deployment_status_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.service_status import ServiceStatus +from typing import Optional, Set +from typing_extensions import Self + +class DeploymentStatusResponse(BaseModel): + """ + DeploymentStatusResponse + """ # noqa: E501 + id: StrictInt + type: DeploymentType + status: DeploymentStatus + service_status: Optional[ServiceStatus] + error_message: Optional[StrictStr] + endpoint_url: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["id", "type", "status", "service_status", "error_message", "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 DeploymentStatusResponse 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 service_status (nullable) is None + # and model_fields_set contains the field + if self.service_status is None and "service_status" in self.model_fields_set: + _dict['service_status'] = None + + # set to None if error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + + # set to None if endpoint_url (nullable) is None + # and model_fields_set contains the field + if self.endpoint_url is None and "endpoint_url" in self.model_fields_set: + _dict['endpoint_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeploymentStatusResponse 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"), + "type": obj.get("type"), + "status": obj.get("status"), + "service_status": obj.get("service_status"), + "error_message": obj.get("error_message"), + "endpoint_url": obj.get("endpoint_url") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/deployment_type.py b/platform_api_python_client/platform_api_python_client/models/deployment_type.py new file mode 100644 index 0000000..40ba35f --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/deployment_type.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 DeploymentType(str, Enum): + """ + DeploymentType + """ + + """ + allowed enum values + """ + INFERENCE = 'inference' + TRAINING = 'training' + COMPUTE = 'compute' + COMPILATION = 'compilation' + INFERENCE_V2 = 'inference_v2' + COMPUTE_V2 = 'compute_v2' + CSERVE = 'cserve' + CSERVE_V2 = 'cserve_v2' + DEPLOYMENT = 'deployment' + RAG = 'rag' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeploymentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/platform_api_python_client/models/deployment_usage_value.py b/platform_api_python_client/platform_api_python_client/models/deployment_usage_value.py new file mode 100644 index 0000000..b8ddd2a --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/deployment_usage_value.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DeploymentUsageValue(BaseModel): + """ + DeploymentUsageValue + """ # noqa: E501 + timestamp: StrictInt + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["timestamp", "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 DeploymentUsageValue 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 DeploymentUsageValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "value": obj.get("value") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_c_serve_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_c_serve_deployment_response.py new file mode 100644 index 0000000..37549de --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_c_serve_deployment_response.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetCServeDeploymentResponse(BaseModel): + """ + GetCServeDeploymentResponse + """ # noqa: E501 + model: StrictStr + is_embedding_model: StrictBool + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + block_size: StrictInt + swap_space: Annotated[int, Field(strict=True, ge=0)] + gpu_mem_util: Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + max_num_seqs: StrictInt + offloading_num: StrictInt + use_prefix_caching: Optional[StrictBool] + use_chunked_prefill: Optional[StrictBool] + chunked_prefill_size: Optional[StrictInt] + eager_execution: Optional[StrictBool] + num_scheduler_steps: Optional[StrictInt] + use_flashinfer: StrictBool + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] + dtype: StrictStr + tokenizer: Optional[StrictStr] + spec_proposer: Optional[StrictStr] + spec_draft_model: Optional[StrictStr] + spec_tokens: Optional[StrictInt] + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] + seed: StrictInt + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + min_scale: StrictInt + max_scale: StrictInt + endpoint_certificate_authority: Optional[StrictStr] + concurrency: Optional[StrictInt] + env_vars: Dict[str, StrictStr] + __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + + @field_validator('block_size') + def block_size_validate_enum(cls, value): + """Validates the enum""" + if value not in set([16, 32]): + raise ValueError("must be one of enum values (16, 32)") + return value + + @field_validator('dtype') + def dtype_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['auto', 'float16', 'float32', 'bfloat16']): + raise ValueError("must be one of enum values ('auto', 'float16', 'float32', 'bfloat16')") + return value + + @field_validator('spec_proposer') + def spec_proposer_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'prompt_lookup']): + raise ValueError("must be one of enum values ('draft', 'prompt_lookup')") + 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 GetCServeDeploymentResponse 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 use_prefix_caching (nullable) is None + # and model_fields_set contains the field + if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: + _dict['use_prefix_caching'] = None + + # set to None if use_chunked_prefill (nullable) is None + # and model_fields_set contains the field + if self.use_chunked_prefill is None and "use_chunked_prefill" in self.model_fields_set: + _dict['use_chunked_prefill'] = None + + # set to None if chunked_prefill_size (nullable) is None + # and model_fields_set contains the field + if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: + _dict['chunked_prefill_size'] = None + + # set to None if eager_execution (nullable) is None + # and model_fields_set contains the field + if self.eager_execution is None and "eager_execution" in self.model_fields_set: + _dict['eager_execution'] = None + + # set to None if num_scheduler_steps (nullable) is None + # and model_fields_set contains the field + if self.num_scheduler_steps is None and "num_scheduler_steps" in self.model_fields_set: + _dict['num_scheduler_steps'] = None + + # set to None if max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # set to None if tokenizer (nullable) is None + # and model_fields_set contains the field + if self.tokenizer is None and "tokenizer" in self.model_fields_set: + _dict['tokenizer'] = None + + # set to None if spec_proposer (nullable) is None + # and model_fields_set contains the field + if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: + _dict['spec_proposer'] = None + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetCServeDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "use_prefix_caching": obj.get("use_prefix_caching"), + "use_chunked_prefill": obj.get("use_chunked_prefill"), + "chunked_prefill_size": obj.get("chunked_prefill_size"), + "eager_execution": obj.get("eager_execution"), + "num_scheduler_steps": obj.get("num_scheduler_steps"), + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "max_model_len": obj.get("max_model_len"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "tokenizer": obj.get("tokenizer"), + "spec_proposer": obj.get("spec_proposer"), + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "seed": obj.get("seed") if obj.get("seed") is not None else 0, + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_c_serve_v2_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_c_serve_v2_deployment_response.py new file mode 100644 index 0000000..7219d2b --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_c_serve_v2_deployment_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetCServeV2DeploymentResponse(BaseModel): + """ + GetCServeV2DeploymentResponse + """ # noqa: E501 + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + recipe: CServeV2RecipeOutput + min_scale: StrictInt + max_scale: StrictInt + endpoint_certificate_authority: Optional[StrictStr] + concurrency: Optional[StrictInt] + env_vars: Dict[str, StrictStr] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + + 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 GetCServeV2DeploymentResponse 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetCServeV2DeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_cluster_response.py b/platform_api_python_client/platform_api_python_client/models/get_cluster_response.py new file mode 100644 index 0000000..cea676e --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_cluster_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GetClusterResponse(BaseModel): + """ + GetClusterResponse + """ # noqa: E501 + id: StrictInt + display_name: StrictStr + region: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["id", "display_name", "region"] + + 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 GetClusterResponse 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 region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict['region'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetClusterResponse 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"), + "display_name": obj.get("display_name"), + "region": obj.get("region") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_compute_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_compute_deployment_response.py new file mode 100644 index 0000000..2d02c2b --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_compute_deployment_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetComputeDeploymentResponse(BaseModel): + """ + GetComputeDeploymentResponse + """ # noqa: E501 + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + exposed_port: StrictInt + ssh_public_key: Optional[StrictStr] + ssh_password: Optional[StrictStr] + env_vars: Optional[Dict[str, StrictStr]] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "exposed_port", "ssh_public_key", "ssh_password", "env_vars"] + + 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 GetComputeDeploymentResponse 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 image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if ssh_public_key (nullable) is None + # and model_fields_set contains the field + if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set: + _dict['ssh_public_key'] = None + + # set to None if ssh_password (nullable) is None + # and model_fields_set contains the field + if self.ssh_password is None and "ssh_password" in self.model_fields_set: + _dict['ssh_password'] = None + + # set to None if env_vars (nullable) is None + # and model_fields_set contains the field + if self.env_vars is None and "env_vars" in self.model_fields_set: + _dict['env_vars'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetComputeDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "exposed_port": obj.get("exposed_port"), + "ssh_public_key": obj.get("ssh_public_key"), + "ssh_password": obj.get("ssh_password"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_deployment_log_response.py b/platform_api_python_client/platform_api_python_client/models/get_deployment_log_response.py new file mode 100644 index 0000000..e940439 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_deployment_log_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GetDeploymentLogResponse(BaseModel): + """ + GetDeploymentLogResponse + """ # noqa: E501 + events: List[Dict[str, Any]] + next_page_token: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["events", "next_page_token"] + + 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 GetDeploymentLogResponse 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 next_page_token (nullable) is None + # and model_fields_set contains the field + if self.next_page_token is None and "next_page_token" in self.model_fields_set: + _dict['next_page_token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeploymentLogResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": obj.get("events"), + "next_page_token": obj.get("next_page_token") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_deployment_response.py new file mode 100644 index 0000000..0532284 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_deployment_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetDeploymentResponse(BaseModel): + """ + GetDeploymentResponse + """ # noqa: E501 + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id"] + + 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 GetDeploymentResponse 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 image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_deployment_usage_response.py b/platform_api_python_client/platform_api_python_client/models/get_deployment_usage_response.py new file mode 100644 index 0000000..867c6d2 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_deployment_usage_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from typing import Optional, Set +from typing_extensions import Self + +class GetDeploymentUsageResponse(BaseModel): + """ + GetDeploymentUsageResponse + """ # noqa: E501 + values: List[DeploymentUsageValue] + __properties: ClassVar[List[str]] = ["values"] + + 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 GetDeploymentUsageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in values (list) + _items = [] + if self.values: + for _item_values in self.values: + if _item_values: + _items.append(_item_values.to_dict()) + _dict['values'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeploymentUsageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": [DeploymentUsageValue.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_inference_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_inference_deployment_response.py new file mode 100644 index 0000000..220b11d --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_inference_deployment_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetInferenceDeploymentResponse(BaseModel): + """ + GetInferenceDeploymentResponse + """ # noqa: E501 + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + container_port: StrictInt + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] + healthcheck: Optional[StrictStr] + endpoint_certificate_authority: Optional[StrictStr] + env_vars: Optional[Dict[str, StrictStr]] + command: Optional[List[StrictStr]] + command_args: Optional[List[StrictStr]] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "container_port", "min_scale", "max_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "env_vars", "command", "command_args"] + + 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 GetInferenceDeploymentResponse 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 image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = 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 + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if env_vars (nullable) is None + # and model_fields_set contains the field + if self.env_vars is None and "env_vars" in self.model_fields_set: + _dict['env_vars'] = None + + # set to None if command (nullable) is None + # and model_fields_set contains the field + if self.command is None and "command" in self.model_fields_set: + _dict['command'] = None + + # set to None if command_args (nullable) is None + # and model_fields_set contains the field + if self.command_args is None and "command_args" in self.model_fields_set: + _dict['command_args'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInferenceDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "container_port": obj.get("container_port"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), + "healthcheck": obj.get("healthcheck"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "env_vars": obj.get("env_vars"), + "command": obj.get("command"), + "command_args": obj.get("command_args") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_payments_response.py b/platform_api_python_client/platform_api_python_client/models/get_payments_response.py new file mode 100644 index 0000000..906a802 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_payments_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetPaymentsResponse(BaseModel): + """ + GetPaymentsResponse + """ # noqa: E501 + has_more: StrictBool + payments: List[Dict[str, Any]] + __properties: ClassVar[List[str]] = ["has_more", "payments"] + + 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 GetPaymentsResponse 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 GetPaymentsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "payments": obj.get("payments") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/get_rag_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/get_rag_deployment_response.py new file mode 100644 index 0000000..a30c9da --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/get_rag_deployment_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetRagDeploymentResponse(BaseModel): + """ + GetRagDeploymentResponse + """ # noqa: E501 + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + recipe: CServeV2RecipeOutput + centml_api_key: StrictStr + min_scale: StrictInt + max_scale: StrictInt + endpoint_certificate_authority: Optional[StrictStr] + concurrency: Optional[StrictInt] + env_vars: Dict[str, StrictStr] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + + 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 GetRagDeploymentResponse 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 recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetRagDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "centml_api_key": obj.get("centml_api_key"), + "min_scale": obj.get("min_scale") if obj.get("min_scale") is not None else 1, + "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "concurrency": obj.get("concurrency"), + "env_vars": obj.get("env_vars") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/hardware_instance_response.py b/platform_api_python_client/platform_api_python_client/models/hardware_instance_response.py new file mode 100644 index 0000000..5a05658 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/hardware_instance_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class HardwareInstanceResponse(BaseModel): + """ + HardwareInstanceResponse + """ # noqa: E501 + id: StrictInt + name: StrictStr + gpu_type: StrictStr + num_gpu: StrictInt + cpu: StrictInt + memory: StrictInt + cost_per_hr: StrictInt + cluster_id: StrictInt + provider: Optional[StrictStr] + num_accelerators: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "provider", "num_accelerators"] + + 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 HardwareInstanceResponse 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 provider (nullable) is None + # and model_fields_set contains the field + if self.provider is None and "provider" in self.model_fields_set: + _dict['provider'] = None + + # set to None if num_accelerators (nullable) is None + # and model_fields_set contains the field + if self.num_accelerators is None and "num_accelerators" in self.model_fields_set: + _dict['num_accelerators'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HardwareInstanceResponse 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"), + "gpu_type": obj.get("gpu_type"), + "num_gpu": obj.get("num_gpu"), + "cpu": obj.get("cpu"), + "memory": obj.get("memory"), + "cost_per_hr": obj.get("cost_per_hr"), + "cluster_id": obj.get("cluster_id"), + "provider": obj.get("provider"), + "num_accelerators": obj.get("num_accelerators") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/http_validation_error.py b/platform_api_python_client/platform_api_python_client/models/http_validation_error.py new file mode 100644 index 0000000..9ff09c8 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/http_validation_error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.validation_error import ValidationError +from typing import Optional, Set +from typing_extensions import Self + +class HTTPValidationError(BaseModel): + """ + HTTPValidationError + """ # noqa: E501 + detail: Optional[List[ValidationError]] = None + __properties: ClassVar[List[str]] = ["detail"] + + 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 HTTPValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in detail (list) + _items = [] + if self.detail: + for _item_detail in self.detail: + if _item_detail: + _items.append(_item_detail.to_dict()) + _dict['detail'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HTTPValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detail": [ValidationError.from_dict(_item) for _item in obj["detail"]] if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_api_key_response.py b/platform_api_python_client/platform_api_python_client/models/list_api_key_response.py new file mode 100644 index 0000000..88b5c53 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_api_key_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.api_key_response import APIKeyResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListAPIKeyResponse(BaseModel): + """ + ListAPIKeyResponse + """ # noqa: E501 + results: List[APIKeyResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListAPIKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListAPIKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [APIKeyResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_c_serve_recipe_response.py b/platform_api_python_client/platform_api_python_client/models/list_c_serve_recipe_response.py new file mode 100644 index 0000000..5c9e646 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_c_serve_recipe_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListCServeRecipeResponse(BaseModel): + """ + ListCServeRecipeResponse + """ # noqa: E501 + results: List[CServeRecipeResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListCServeRecipeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListCServeRecipeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [CServeRecipeResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_daily_bill_response.py b/platform_api_python_client/platform_api_python_client/models/list_daily_bill_response.py new file mode 100644 index 0000000..6fe65c3 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_daily_bill_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListDailyBillResponse(BaseModel): + """ + ListDailyBillResponse + """ # noqa: E501 + results: List[DailyBillResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListDailyBillResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDailyBillResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [DailyBillResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_get_cluster_response.py b/platform_api_python_client/platform_api_python_client/models/list_get_cluster_response.py new file mode 100644 index 0000000..bd0d5cf --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_get_cluster_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListGetClusterResponse(BaseModel): + """ + ListGetClusterResponse + """ # noqa: E501 + results: List[GetClusterResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListGetClusterResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListGetClusterResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [GetClusterResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_get_deployment_response.py b/platform_api_python_client/platform_api_python_client/models/list_get_deployment_response.py new file mode 100644 index 0000000..07734a8 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_get_deployment_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListGetDeploymentResponse(BaseModel): + """ + ListGetDeploymentResponse + """ # noqa: E501 + results: List[GetDeploymentResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListGetDeploymentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListGetDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [GetDeploymentResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_hardware_instance_response.py b/platform_api_python_client/platform_api_python_client/models/list_hardware_instance_response.py new file mode 100644 index 0000000..56b99c6 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_hardware_instance_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListHardwareInstanceResponse(BaseModel): + """ + ListHardwareInstanceResponse + """ # noqa: E501 + results: List[HardwareInstanceResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListHardwareInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListHardwareInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [HardwareInstanceResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_prebuilt_image_response.py b/platform_api_python_client/platform_api_python_client/models/list_prebuilt_image_response.py new file mode 100644 index 0000000..3db0fec --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_prebuilt_image_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListPrebuiltImageResponse(BaseModel): + """ + ListPrebuiltImageResponse + """ # noqa: E501 + results: List[PrebuiltImageResponse] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListPrebuiltImageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListPrebuiltImageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PrebuiltImageResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/list_user_vault_items_response.py b/platform_api_python_client/platform_api_python_client/models/list_user_vault_items_response.py new file mode 100644 index 0000000..ca4dbcc --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/list_user_vault_items_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from typing import Optional, Set +from typing_extensions import Self + +class ListUserVaultItemsResponse(BaseModel): + """ + ListUserVaultItemsResponse + """ # noqa: E501 + results: List[UserVaultItemOutput] + __properties: ClassVar[List[str]] = ["results"] + + 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 ListUserVaultItemsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListUserVaultItemsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [UserVaultItemOutput.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/metric.py b/platform_api_python_client/platform_api_python_client/models/metric.py new file mode 100644 index 0000000..c5aea27 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/metric.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 Metric(str, Enum): + """ + Metric + """ + + """ + allowed enum values + """ + CPU = 'cpu' + MEMORY = 'memory' + GPU = 'gpu' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Metric from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/platform_api_python_client/models/prebuilt_image_response.py b/platform_api_python_client/platform_api_python_client/models/prebuilt_image_response.py new file mode 100644 index 0000000..bebc261 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/prebuilt_image_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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, Optional +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class PrebuiltImageResponse(BaseModel): + """ + PrebuiltImageResponse + """ # noqa: E501 + image_name: StrictStr + label: StrictStr + tags: List[StrictStr] + type: DeploymentType + port: StrictInt + healthcheck: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["image_name", "label", "tags", "type", "port", "healthcheck"] + + 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 PrebuiltImageResponse 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 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 + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrebuiltImageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image_name": obj.get("image_name"), + "label": obj.get("label"), + "tags": obj.get("tags"), + "type": obj.get("type"), + "port": obj.get("port"), + "healthcheck": obj.get("healthcheck") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/service_status.py b/platform_api_python_client/platform_api_python_client/models/service_status.py new file mode 100644 index 0000000..f26db62 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/service_status.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 ServiceStatus(str, Enum): + """ + ServiceStatus + """ + + """ + allowed enum values + """ + HEALTHY = 'Healthy' + MISSING = 'Missing' + SCALINGUP = 'ScalingUp' + PULLING = 'Pulling' + INITIALIZING = 'Initializing' + ERROR = 'Error' + CREATECONTAINERCONFIGERROR = 'CreateContainerConfigError' + CRASHLOOPBACKOFF = 'CrashLoopBackOff' + IMAGEPULLBACKOFF = 'ImagePullBackOff' + PROGRESSDEADLINEEXCEEDED = 'ProgressDeadlineExceeded' + NOTREADY = 'NotReady' + UNKNOWN = 'Unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ServiceStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/platform_api_python_client/models/user_support_email_request.py b/platform_api_python_client/platform_api_python_client/models/user_support_email_request.py new file mode 100644 index 0000000..bf34253 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/user_support_email_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserSupportEmailRequest(BaseModel): + """ + UserSupportEmailRequest + """ # noqa: E501 + message: StrictStr + subject: StrictStr + send_to_sales: StrictBool + __properties: ClassVar[List[str]] = ["message", "subject", "send_to_sales"] + + 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 UserSupportEmailRequest 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 UserSupportEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "subject": obj.get("subject"), + "send_to_sales": obj.get("send_to_sales") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/user_vault_item_input.py b/platform_api_python_client/platform_api_python_client/models/user_vault_item_input.py new file mode 100644 index 0000000..a986736 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/user_vault_item_input.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.user_vault_type import UserVaultType +from typing import Optional, Set +from typing_extensions import Self + +class UserVaultItemInput(BaseModel): + """ + UserVaultItemInput + """ # noqa: E501 + type: UserVaultType + key: StrictStr + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["type", "key", "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 UserVaultItemInput 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 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 + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserVaultItemInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/user_vault_item_output.py b/platform_api_python_client/platform_api_python_client/models/user_vault_item_output.py new file mode 100644 index 0000000..262f82c --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/user_vault_item_output.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.user_vault_type import UserVaultType +from typing import Optional, Set +from typing_extensions import Self + +class UserVaultItemOutput(BaseModel): + """ + UserVaultItemOutput + """ # noqa: E501 + type: UserVaultType + key: StrictStr + value: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["type", "key", "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 UserVaultItemOutput 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 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 + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserVaultItemOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/user_vault_type.py b/platform_api_python_client/platform_api_python_client/models/user_vault_type.py new file mode 100644 index 0000000..65a131a --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/user_vault_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + 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 UserVaultType(str, Enum): + """ + UserVaultType + """ + + """ + allowed enum values + """ + ENV_VARS = 'env_vars' + SSH_KEYS = 'ssh_keys' + ACCESS_TOKENS = 'access_tokens' + CERTIFICATES = 'certificates' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserVaultType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/platform_api_python_client/models/validation_error.py b/platform_api_python_client/platform_api_python_client/models/validation_error.py new file mode 100644 index 0000000..a27db44 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/validation_error.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + loc: List[ValidationErrorLocInner] + msg: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["loc", "msg", "type"] + + 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 ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in loc (list) + _items = [] + if self.loc: + for _item_loc in self.loc: + if _item_loc: + _items.append(_item_loc.to_dict()) + _dict['loc'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, + "msg": obj.get("msg"), + "type": obj.get("type") + }) + return _obj + + diff --git a/platform_api_python_client/platform_api_python_client/models/validation_error_loc_inner.py b/platform_api_python_client/platform_api_python_client/models/validation_error_loc_inner.py new file mode 100644 index 0000000..abee848 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/models/validation_error_loc_inner.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator +from typing import Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"] + +class ValidationErrorLocInner(BaseModel): + """ + ValidationErrorLocInner + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = None + # data type: int + anyof_schema_2_validator: Optional[StrictInt] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[int, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "int", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ValidationErrorLocInner.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: int + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into int + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/platform_api_python_client/platform_api_python_client/py.typed b/platform_api_python_client/platform_api_python_client/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/platform_api_python_client/platform_api_python_client/rest.py b/platform_api_python_client/platform_api_python_client/rest.py new file mode 100644 index 0000000..8cbbf58 --- /dev/null +++ b/platform_api_python_client/platform_api_python_client/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from platform_api_python_client.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + 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." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/platform_api_python_client/pyproject.toml b/platform_api_python_client/pyproject.toml new file mode 100644 index 0000000..b537db9 --- /dev/null +++ b/platform_api_python_client/pyproject.toml @@ -0,0 +1,72 @@ +[tool.poetry] +name = "platform_api_python_client" +version = "1.0.0" +description = "Platform External API" +authors = ["OpenAPI Generator Community "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/centml/platform/client" +keywords = ["OpenAPI", "OpenAPI-Generator", "Platform External API"] +include = ["platform_api_python_client/py.typed"] + +[tool.poetry.dependencies] +python = "^3.8" + +urllib3 = ">= 1.25.3 < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "platform_api_python_client", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/platform_api_python_client/requirements.txt b/platform_api_python_client/requirements.txt new file mode 100644 index 0000000..67f7f68 --- /dev/null +++ b/platform_api_python_client/requirements.txt @@ -0,0 +1,4 @@ +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/platform_api_python_client/setup.cfg b/platform_api_python_client/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/platform_api_python_client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/platform_api_python_client/setup.py b/platform_api_python_client/setup.py new file mode 100644 index 0000000..6fd77f8 --- /dev/null +++ b/platform_api_python_client/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "platform-api-python-client" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">= 3.8" +REQUIRES = [ + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Platform External API", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "Platform External API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + """, # noqa: E501 + package_data={"platform_api_python_client": ["py.typed"]}, +) diff --git a/platform_api_python_client/test-requirements.txt b/platform_api_python_client/test-requirements.txt new file mode 100644 index 0000000..e98555c --- /dev/null +++ b/platform_api_python_client/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/platform_api_python_client/test/__init__.py b/platform_api_python_client/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/platform_api_python_client/test/test_api_key_request.py b/platform_api_python_client/test/test_api_key_request.py new file mode 100644 index 0000000..1e7ed6e --- /dev/null +++ b/platform_api_python_client/test/test_api_key_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.api_key_request import APIKeyRequest + +class TestAPIKeyRequest(unittest.TestCase): + """APIKeyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> APIKeyRequest: + """Test APIKeyRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `APIKeyRequest` + """ + model = APIKeyRequest() + if include_optional: + return APIKeyRequest( + name = '' + ) + else: + return APIKeyRequest( + name = '', + ) + """ + + def testAPIKeyRequest(self): + """Test APIKeyRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_api_key_response.py b/platform_api_python_client/test/test_api_key_response.py new file mode 100644 index 0000000..38bb61b --- /dev/null +++ b/platform_api_python_client/test/test_api_key_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.api_key_response import APIKeyResponse + +class TestAPIKeyResponse(unittest.TestCase): + """APIKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> APIKeyResponse: + """Test APIKeyResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `APIKeyResponse` + """ + model = APIKeyResponse() + if include_optional: + return APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testAPIKeyResponse(self): + """Test APIKeyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_recipe.py b/platform_api_python_client/test/test_c_serve_recipe.py new file mode 100644 index 0000000..2928556 --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_recipe.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe import CServeRecipe + +class TestCServeRecipe(unittest.TestCase): + """CServeRecipe unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipe: + """Test CServeRecipe + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeRecipe` + """ + model = CServeRecipe() + if include_optional: + return CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56 + ) + else: + return CServeRecipe( + model = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + ) + """ + + def testCServeRecipe(self): + """Test CServeRecipe""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_recipe_perf.py b/platform_api_python_client/test/test_c_serve_recipe_perf.py new file mode 100644 index 0000000..474fda7 --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_recipe_perf.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf + +class TestCServeRecipePerf(unittest.TestCase): + """CServeRecipePerf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipePerf: + """Test CServeRecipePerf + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeRecipePerf` + """ + model = CServeRecipePerf() + if include_optional: + return CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ] + ) + else: + return CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], + ) + """ + + def testCServeRecipePerf(self): + """Test CServeRecipePerf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_recipe_response.py b/platform_api_python_client/test/test_c_serve_recipe_response.py new file mode 100644 index 0000000..b59d4c0 --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_recipe_response.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse + +class TestCServeRecipeResponse(unittest.TestCase): + """CServeRecipeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipeResponse: + """Test CServeRecipeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeRecipeResponse` + """ + model = CServeRecipeResponse() + if include_optional: + return CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ) + ) + else: + return CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + ) + """ + + def testCServeRecipeResponse(self): + """Test CServeRecipeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_v2_recipe.py b/platform_api_python_client/test/test_c_serve_v2_recipe.py new file mode 100644 index 0000000..462e1d4 --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_v2_recipe.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe + +class TestCServeV2Recipe(unittest.TestCase): + """CServeV2Recipe unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeV2Recipe: + """Test CServeV2Recipe + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeV2Recipe` + """ + model = CServeV2Recipe() + if include_optional: + return CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56 + ) + else: + return CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, + ) + """ + + def testCServeV2Recipe(self): + """Test CServeV2Recipe""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_v2_recipe_input.py b/platform_api_python_client/test/test_c_serve_v2_recipe_input.py new file mode 100644 index 0000000..72bedeb --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_v2_recipe_input.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput + +class TestCServeV2RecipeInput(unittest.TestCase): + """CServeV2RecipeInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeV2RecipeInput: + """Test CServeV2RecipeInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeV2RecipeInput` + """ + model = CServeV2RecipeInput() + if include_optional: + return CServeV2RecipeInput( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56 + ) + else: + return CServeV2RecipeInput( + model = '', + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + ) + """ + + def testCServeV2RecipeInput(self): + """Test CServeV2RecipeInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_c_serve_v2_recipe_output.py b/platform_api_python_client/test/test_c_serve_v2_recipe_output.py new file mode 100644 index 0000000..6505865 --- /dev/null +++ b/platform_api_python_client/test/test_c_serve_v2_recipe_output.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput + +class TestCServeV2RecipeOutput(unittest.TestCase): + """CServeV2RecipeOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeV2RecipeOutput: + """Test CServeV2RecipeOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeV2RecipeOutput` + """ + model = CServeV2RecipeOutput() + if include_optional: + return CServeV2RecipeOutput( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56 + ) + else: + return CServeV2RecipeOutput( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, + ) + """ + + def testCServeV2RecipeOutput(self): + """Test CServeV2RecipeOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_c_serve_deployment_request.py b/platform_api_python_client/test/test_create_c_serve_deployment_request.py new file mode 100644 index 0000000..b336efd --- /dev/null +++ b/platform_api_python_client/test/test_create_c_serve_deployment_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest + +class TestCreateCServeDeploymentRequest(unittest.TestCase): + """CreateCServeDeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: + """Test CreateCServeDeploymentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCServeDeploymentRequest` + """ + model = CreateCServeDeploymentRequest() + if include_optional: + return CreateCServeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hf_token = '', + endpoint_certificate_authority = '', + min_scale = 56, + max_scale = 56, + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return CreateCServeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + min_scale = 56, + max_scale = 56, + ) + """ + + def testCreateCServeDeploymentRequest(self): + """Test CreateCServeDeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_c_serve_deployment_response.py b/platform_api_python_client/test/test_create_c_serve_deployment_response.py new file mode 100644 index 0000000..e1fe90b --- /dev/null +++ b/platform_api_python_client/test/test_create_c_serve_deployment_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse + +class TestCreateCServeDeploymentResponse(unittest.TestCase): + """CreateCServeDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCServeDeploymentResponse: + """Test CreateCServeDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCServeDeploymentResponse` + """ + model = CreateCServeDeploymentResponse() + if include_optional: + return CreateCServeDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '' + ) + else: + return CreateCServeDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + ) + """ + + def testCreateCServeDeploymentResponse(self): + """Test CreateCServeDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_c_serve_v2_deployment_request.py b/platform_api_python_client/test/test_create_c_serve_v2_deployment_request.py new file mode 100644 index 0000000..af466b0 --- /dev/null +++ b/platform_api_python_client/test/test_create_c_serve_v2_deployment_request.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest + +class TestCreateCServeV2DeploymentRequest(unittest.TestCase): + """CreateCServeV2DeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCServeV2DeploymentRequest: + """Test CreateCServeV2DeploymentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCServeV2DeploymentRequest` + """ + model = CreateCServeV2DeploymentRequest() + if include_optional: + return CreateCServeV2DeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hf_token = '', + endpoint_certificate_authority = '', + min_scale = 56, + max_scale = 56, + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return CreateCServeV2DeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + min_scale = 56, + max_scale = 56, + ) + """ + + def testCreateCServeV2DeploymentRequest(self): + """Test CreateCServeV2DeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_c_serve_v2_deployment_response.py b/platform_api_python_client/test/test_create_c_serve_v2_deployment_response.py new file mode 100644 index 0000000..2e3ff94 --- /dev/null +++ b/platform_api_python_client/test/test_create_c_serve_v2_deployment_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse + +class TestCreateCServeV2DeploymentResponse(unittest.TestCase): + """CreateCServeV2DeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCServeV2DeploymentResponse: + """Test CreateCServeV2DeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCServeV2DeploymentResponse` + """ + model = CreateCServeV2DeploymentResponse() + if include_optional: + return CreateCServeV2DeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '' + ) + else: + return CreateCServeV2DeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + ) + """ + + def testCreateCServeV2DeploymentResponse(self): + """Test CreateCServeV2DeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_checkout_request.py b/platform_api_python_client/test/test_create_checkout_request.py new file mode 100644 index 0000000..0efa05a --- /dev/null +++ b/platform_api_python_client/test/test_create_checkout_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest + +class TestCreateCheckoutRequest(unittest.TestCase): + """CreateCheckoutRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCheckoutRequest: + """Test CreateCheckoutRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCheckoutRequest` + """ + model = CreateCheckoutRequest() + if include_optional: + return CreateCheckoutRequest( + amount_credits = 56, + success_url = '' + ) + else: + return CreateCheckoutRequest( + amount_credits = 56, + success_url = '', + ) + """ + + def testCreateCheckoutRequest(self): + """Test CreateCheckoutRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_checkout_response.py b/platform_api_python_client/test/test_create_checkout_response.py new file mode 100644 index 0000000..cfe77b8 --- /dev/null +++ b/platform_api_python_client/test/test_create_checkout_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse + +class TestCreateCheckoutResponse(unittest.TestCase): + """CreateCheckoutResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCheckoutResponse: + """Test CreateCheckoutResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCheckoutResponse` + """ + model = CreateCheckoutResponse() + if include_optional: + return CreateCheckoutResponse( + url = '' + ) + else: + return CreateCheckoutResponse( + url = '', + ) + """ + + def testCreateCheckoutResponse(self): + """Test CreateCheckoutResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_compute_deployment_request.py b/platform_api_python_client/test/test_create_compute_deployment_request.py new file mode 100644 index 0000000..9c0a0ed --- /dev/null +++ b/platform_api_python_client/test/test_create_compute_deployment_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest + +class TestCreateComputeDeploymentRequest(unittest.TestCase): + """CreateComputeDeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateComputeDeploymentRequest: + """Test CreateComputeDeploymentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateComputeDeploymentRequest` + """ + model = CreateComputeDeploymentRequest() + if include_optional: + return CreateComputeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + image_url = '', + ssh_public_key = '', + ssh_password = '' + ) + else: + return CreateComputeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + image_url = '', + ) + """ + + def testCreateComputeDeploymentRequest(self): + """Test CreateComputeDeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_compute_deployment_response.py b/platform_api_python_client/test/test_create_compute_deployment_response.py new file mode 100644 index 0000000..093f2d2 --- /dev/null +++ b/platform_api_python_client/test/test_create_compute_deployment_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse + +class TestCreateComputeDeploymentResponse(unittest.TestCase): + """CreateComputeDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateComputeDeploymentResponse: + """Test CreateComputeDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateComputeDeploymentResponse` + """ + model = CreateComputeDeploymentResponse() + if include_optional: + return CreateComputeDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + port = 56 + ) + else: + return CreateComputeDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + port = 56, + ) + """ + + def testCreateComputeDeploymentResponse(self): + """Test CreateComputeDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_inference_deployment_request.py b/platform_api_python_client/test/test_create_inference_deployment_request.py new file mode 100644 index 0000000..32b1695 --- /dev/null +++ b/platform_api_python_client/test/test_create_inference_deployment_request.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest + +class TestCreateInferenceDeploymentRequest(unittest.TestCase): + """CreateInferenceDeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: + """Test CreateInferenceDeploymentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInferenceDeploymentRequest` + """ + model = CreateInferenceDeploymentRequest() + if include_optional: + return CreateInferenceDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + image_url = '', + port = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, + healthcheck = '', + env_vars = { + 'key' : '' + }, + command = [ + '' + ], + command_args = [ + '' + ], + endpoint_certificate_authority = '' + ) + else: + return CreateInferenceDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + image_url = '', + port = 56, + min_scale = 56, + max_scale = 56, + ) + """ + + def testCreateInferenceDeploymentRequest(self): + """Test CreateInferenceDeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_inference_deployment_response.py b/platform_api_python_client/test/test_create_inference_deployment_response.py new file mode 100644 index 0000000..fc7bfa4 --- /dev/null +++ b/platform_api_python_client/test/test_create_inference_deployment_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse + +class TestCreateInferenceDeploymentResponse(unittest.TestCase): + """CreateInferenceDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInferenceDeploymentResponse: + """Test CreateInferenceDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInferenceDeploymentResponse` + """ + model = CreateInferenceDeploymentResponse() + if include_optional: + return CreateInferenceDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '' + ) + else: + return CreateInferenceDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + ) + """ + + def testCreateInferenceDeploymentResponse(self): + """Test CreateInferenceDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_rag_deployment_request.py b/platform_api_python_client/test/test_create_rag_deployment_request.py new file mode 100644 index 0000000..1d4c957 --- /dev/null +++ b/platform_api_python_client/test/test_create_rag_deployment_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest + +class TestCreateRagDeploymentRequest(unittest.TestCase): + """CreateRagDeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRagDeploymentRequest: + """Test CreateRagDeploymentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRagDeploymentRequest` + """ + model = CreateRagDeploymentRequest() + if include_optional: + return CreateRagDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hf_token = '', + centml_api_key = '', + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return CreateRagDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + centml_api_key = '', + ) + """ + + def testCreateRagDeploymentRequest(self): + """Test CreateRagDeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_create_rag_deployment_response.py b/platform_api_python_client/test/test_create_rag_deployment_response.py new file mode 100644 index 0000000..1eb92c2 --- /dev/null +++ b/platform_api_python_client/test/test_create_rag_deployment_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse + +class TestCreateRagDeploymentResponse(unittest.TestCase): + """CreateRagDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRagDeploymentResponse: + """Test CreateRagDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRagDeploymentResponse` + """ + model = CreateRagDeploymentResponse() + if include_optional: + return CreateRagDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '' + ) + else: + return CreateRagDeploymentResponse( + id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + endpoint_url = '', + ) + """ + + def testCreateRagDeploymentResponse(self): + """Test CreateRagDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_credits_response.py b/platform_api_python_client/test/test_credits_response.py new file mode 100644 index 0000000..1b8403e --- /dev/null +++ b/platform_api_python_client/test/test_credits_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.credits_response import CreditsResponse + +class TestCreditsResponse(unittest.TestCase): + """CreditsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreditsResponse: + """Test CreditsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreditsResponse` + """ + model = CreditsResponse() + if include_optional: + return CreditsResponse( + credits = 1.337 + ) + else: + return CreditsResponse( + credits = 1.337, + ) + """ + + def testCreditsResponse(self): + """Test CreditsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_daily_bill_response.py b/platform_api_python_client/test/test_daily_bill_response.py new file mode 100644 index 0000000..edbcb76 --- /dev/null +++ b/platform_api_python_client/test/test_daily_bill_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.daily_bill_response import DailyBillResponse + +class TestDailyBillResponse(unittest.TestCase): + """DailyBillResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DailyBillResponse: + """Test DailyBillResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DailyBillResponse` + """ + model = DailyBillResponse() + if include_optional: + return DailyBillResponse( + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 1.337 + ) + else: + return DailyBillResponse( + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 1.337, + ) + """ + + def testDailyBillResponse(self): + """Test DailyBillResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_deployment_status.py b/platform_api_python_client/test/test_deployment_status.py new file mode 100644 index 0000000..4df85c2 --- /dev/null +++ b/platform_api_python_client/test/test_deployment_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_status import DeploymentStatus + +class TestDeploymentStatus(unittest.TestCase): + """DeploymentStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeploymentStatus(self): + """Test DeploymentStatus""" + # inst = DeploymentStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_deployment_status_request.py b/platform_api_python_client/test/test_deployment_status_request.py new file mode 100644 index 0000000..7dfaea0 --- /dev/null +++ b/platform_api_python_client/test/test_deployment_status_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest + +class TestDeploymentStatusRequest(unittest.TestCase): + """DeploymentStatusRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeploymentStatusRequest: + """Test DeploymentStatusRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeploymentStatusRequest` + """ + model = DeploymentStatusRequest() + if include_optional: + return DeploymentStatusRequest( + status = 'active' + ) + else: + return DeploymentStatusRequest( + status = 'active', + ) + """ + + def testDeploymentStatusRequest(self): + """Test DeploymentStatusRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_deployment_status_response.py b/platform_api_python_client/test/test_deployment_status_response.py new file mode 100644 index 0000000..916c65f --- /dev/null +++ b/platform_api_python_client/test/test_deployment_status_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse + +class TestDeploymentStatusResponse(unittest.TestCase): + """DeploymentStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeploymentStatusResponse: + """Test DeploymentStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeploymentStatusResponse` + """ + model = DeploymentStatusResponse() + if include_optional: + return DeploymentStatusResponse( + id = 56, + type = 'inference', + status = 'active', + service_status = 'Healthy', + error_message = '', + endpoint_url = '' + ) + else: + return DeploymentStatusResponse( + id = 56, + type = 'inference', + status = 'active', + service_status = 'Healthy', + error_message = '', + endpoint_url = '', + ) + """ + + def testDeploymentStatusResponse(self): + """Test DeploymentStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_deployment_type.py b/platform_api_python_client/test/test_deployment_type.py new file mode 100644 index 0000000..1029576 --- /dev/null +++ b/platform_api_python_client/test/test_deployment_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_type import DeploymentType + +class TestDeploymentType(unittest.TestCase): + """DeploymentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeploymentType(self): + """Test DeploymentType""" + # inst = DeploymentType() + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_deployment_usage_value.py b/platform_api_python_client/test/test_deployment_usage_value.py new file mode 100644 index 0000000..9e518ab --- /dev/null +++ b/platform_api_python_client/test/test_deployment_usage_value.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue + +class TestDeploymentUsageValue(unittest.TestCase): + """DeploymentUsageValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeploymentUsageValue: + """Test DeploymentUsageValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeploymentUsageValue` + """ + model = DeploymentUsageValue() + if include_optional: + return DeploymentUsageValue( + timestamp = 56, + value = 1.337 + ) + else: + return DeploymentUsageValue( + timestamp = 56, + value = 1.337, + ) + """ + + def testDeploymentUsageValue(self): + """Test DeploymentUsageValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_external_api.py b/platform_api_python_client/test/test_external_api.py new file mode 100644 index 0000000..d0d2e29 --- /dev/null +++ b/platform_api_python_client/test/test_external_api.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.api.external_api import EXTERNALApi + + +class TestEXTERNALApi(unittest.TestCase): + """EXTERNALApi unit test stubs""" + + def setUp(self) -> None: + self.api = EXTERNALApi() + + def tearDown(self) -> None: + pass + + def test_add_user_request_support_user_requests_post(self) -> None: + """Test case for add_user_request_support_user_requests_post + + Add User Request + """ + pass + + def test_create_api_key_credentials_api_key_post(self) -> None: + """Test case for create_api_key_credentials_api_key_post + + Create Api Key + """ + pass + + def test_create_checkout_payments_checkout_post(self) -> None: + """Test case for create_checkout_payments_checkout_post + + Create Checkout + """ + pass + + def test_create_compute_deployment_deployments_compute_post(self) -> None: + """Test case for create_compute_deployment_deployments_compute_post + + Create Compute Deployment + """ + pass + + def test_create_cserve_deployment_deployments_cserve_post(self) -> None: + """Test case for create_cserve_deployment_deployments_cserve_post + + Create Cserve Deployment + """ + pass + + def test_create_inference_deployment_deployments_inference_post(self) -> None: + """Test case for create_inference_deployment_deployments_inference_post + + Create Inference Deployment + """ + pass + + def test_create_rag_deployment_deployments_rag_post(self) -> None: + """Test case for create_rag_deployment_deployments_rag_post + + Create Rag Deployment + """ + pass + + def test_delete_api_key_credentials_api_key_id_delete(self) -> None: + """Test case for delete_api_key_credentials_api_key_id_delete + + Delete Api Key + """ + pass + + def test_get_api_keys_credentials_api_key_get(self) -> None: + """Test case for get_api_keys_credentials_api_key_get + + Get Api Keys + """ + pass + + def test_get_clusters_clusters_get(self) -> None: + """Test case for get_clusters_clusters_get + + Get Clusters + """ + pass + + def test_get_compute_deployment_deployments_compute_deployment_id_get(self) -> None: + """Test case for get_compute_deployment_deployments_compute_deployment_id_get + + Get Compute Deployment + """ + pass + + def test_get_credits_credits_get(self) -> None: + """Test case for get_credits_credits_get + + Get Credits + """ + pass + + def test_get_cserve_deployment_deployments_cserve_deployment_id_get(self) -> None: + """Test case for get_cserve_deployment_deployments_cserve_deployment_id_get + + Get Cserve Deployment + """ + pass + + def test_get_cserve_recipe_deployments_cserve_recipes_get(self) -> None: + """Test case for get_cserve_recipe_deployments_cserve_recipes_get + + Get Cserve Recipe + """ + pass + + def test_get_deployment_logs_deployments_logs_deployment_id_get(self) -> None: + """Test case for get_deployment_logs_deployments_logs_deployment_id_get + + Get Deployment Logs + """ + pass + + def test_get_deployment_status_deployments_status_deployment_id_get(self) -> None: + """Test case for get_deployment_status_deployments_status_deployment_id_get + + Get Deployment Status + """ + pass + + def test_get_deployments_deployments_get(self) -> None: + """Test case for get_deployments_deployments_get + + Get Deployments + """ + pass + + def test_get_hardware_instances_hardware_instances_get(self) -> None: + """Test case for get_hardware_instances_hardware_instances_get + + Get Hardware Instances + """ + pass + + def test_get_inference_deployment_deployments_inference_deployment_id_get(self) -> None: + """Test case for get_inference_deployment_deployments_inference_deployment_id_get + + Get Inference Deployment + """ + pass + + def test_get_payments_payments_get(self) -> None: + """Test case for get_payments_payments_get + + Get Payments + """ + pass + + def test_get_prebuilt_images_prebuilt_images_get(self) -> None: + """Test case for get_prebuilt_images_prebuilt_images_get + + Get Prebuilt Images + """ + pass + + def test_get_rag_deployment_deployments_rag_deployment_id_get(self) -> None: + """Test case for get_rag_deployment_deployments_rag_deployment_id_get + + Get Rag Deployment + """ + pass + + def test_get_usage_daily_bills_get(self) -> None: + """Test case for get_usage_daily_bills_get + + Get Usage + """ + pass + + def test_get_usage_deployments_usage_deployment_id_get(self) -> None: + """Test case for get_usage_deployments_usage_deployment_id_get + + Get Usage + """ + pass + + def test_setup_stripe_customer_payments_setup_post(self) -> None: + """Test case for setup_stripe_customer_payments_setup_post + + Setup Stripe Customer + """ + pass + + def test_update_deployment_status_deployments_status_deployment_id_put(self) -> None: + """Test case for update_deployment_status_deployments_status_deployment_id_put + + Update Deployment Status + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_c_serve_deployment_response.py b/platform_api_python_client/test/test_get_c_serve_deployment_response.py new file mode 100644 index 0000000..03f66ab --- /dev/null +++ b/platform_api_python_client/test/test_get_c_serve_deployment_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse + +class TestGetCServeDeploymentResponse(unittest.TestCase): + """GetCServeDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetCServeDeploymentResponse: + """Test GetCServeDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetCServeDeploymentResponse` + """ + model = GetCServeDeploymentResponse() + if include_optional: + return GetCServeDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return GetCServeDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + }, + ) + """ + + def testGetCServeDeploymentResponse(self): + """Test GetCServeDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_c_serve_v2_deployment_response.py b/platform_api_python_client/test/test_get_c_serve_v2_deployment_response.py new file mode 100644 index 0000000..dbb5e8f --- /dev/null +++ b/platform_api_python_client/test/test_get_c_serve_v2_deployment_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse + +class TestGetCServeV2DeploymentResponse(unittest.TestCase): + """GetCServeV2DeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetCServeV2DeploymentResponse: + """Test GetCServeV2DeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetCServeV2DeploymentResponse` + """ + model = GetCServeV2DeploymentResponse() + if include_optional: + return GetCServeV2DeploymentResponse( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return GetCServeV2DeploymentResponse( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + }, + ) + """ + + def testGetCServeV2DeploymentResponse(self): + """Test GetCServeV2DeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_cluster_response.py b/platform_api_python_client/test/test_get_cluster_response.py new file mode 100644 index 0000000..2e1b653 --- /dev/null +++ b/platform_api_python_client/test/test_get_cluster_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_cluster_response import GetClusterResponse + +class TestGetClusterResponse(unittest.TestCase): + """GetClusterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetClusterResponse: + """Test GetClusterResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetClusterResponse` + """ + model = GetClusterResponse() + if include_optional: + return GetClusterResponse( + id = 56, + display_name = '' + ) + else: + return GetClusterResponse( + id = 56, + display_name = '', + ) + """ + + def testGetClusterResponse(self): + """Test GetClusterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_compute_deployment_response.py b/platform_api_python_client/test/test_get_compute_deployment_response.py new file mode 100644 index 0000000..1151d2b --- /dev/null +++ b/platform_api_python_client/test/test_get_compute_deployment_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse + +class TestGetComputeDeploymentResponse(unittest.TestCase): + """GetComputeDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetComputeDeploymentResponse: + """Test GetComputeDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetComputeDeploymentResponse` + """ + model = GetComputeDeploymentResponse() + if include_optional: + return GetComputeDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + exposed_port = 56, + ssh_public_key = '', + ssh_password = '', + env_vars = { + 'key' : '' + } + ) + else: + return GetComputeDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + exposed_port = 56, + ssh_public_key = '', + ssh_password = '', + env_vars = { + 'key' : '' + }, + ) + """ + + def testGetComputeDeploymentResponse(self): + """Test GetComputeDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_deployment_log_response.py b/platform_api_python_client/test/test_get_deployment_log_response.py new file mode 100644 index 0000000..4fe4110 --- /dev/null +++ b/platform_api_python_client/test/test_get_deployment_log_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse + +class TestGetDeploymentLogResponse(unittest.TestCase): + """GetDeploymentLogResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeploymentLogResponse: + """Test GetDeploymentLogResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDeploymentLogResponse` + """ + model = GetDeploymentLogResponse() + if include_optional: + return GetDeploymentLogResponse( + events = [ + None + ], + next_page_token = '' + ) + else: + return GetDeploymentLogResponse( + events = [ + None + ], + next_page_token = '', + ) + """ + + def testGetDeploymentLogResponse(self): + """Test GetDeploymentLogResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_deployment_response.py b/platform_api_python_client/test/test_get_deployment_response.py new file mode 100644 index 0000000..ca311ce --- /dev/null +++ b/platform_api_python_client/test/test_get_deployment_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse + +class TestGetDeploymentResponse(unittest.TestCase): + """GetDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeploymentResponse: + """Test GetDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDeploymentResponse` + """ + model = GetDeploymentResponse() + if include_optional: + return GetDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56 + ) + else: + return GetDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + ) + """ + + def testGetDeploymentResponse(self): + """Test GetDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_deployment_usage_response.py b/platform_api_python_client/test/test_get_deployment_usage_response.py new file mode 100644 index 0000000..8f4b11b --- /dev/null +++ b/platform_api_python_client/test/test_get_deployment_usage_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse + +class TestGetDeploymentUsageResponse(unittest.TestCase): + """GetDeploymentUsageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeploymentUsageResponse: + """Test GetDeploymentUsageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDeploymentUsageResponse` + """ + model = GetDeploymentUsageResponse() + if include_optional: + return GetDeploymentUsageResponse( + values = [ + platform_api_python_client.models.deployment_usage_value.DeploymentUsageValue( + timestamp = 56, + value = 1.337, ) + ] + ) + else: + return GetDeploymentUsageResponse( + values = [ + platform_api_python_client.models.deployment_usage_value.DeploymentUsageValue( + timestamp = 56, + value = 1.337, ) + ], + ) + """ + + def testGetDeploymentUsageResponse(self): + """Test GetDeploymentUsageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_inference_deployment_response.py b/platform_api_python_client/test/test_get_inference_deployment_response.py new file mode 100644 index 0000000..79d9a28 --- /dev/null +++ b/platform_api_python_client/test/test_get_inference_deployment_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse + +class TestGetInferenceDeploymentResponse(unittest.TestCase): + """GetInferenceDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetInferenceDeploymentResponse: + """Test GetInferenceDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetInferenceDeploymentResponse` + """ + model = GetInferenceDeploymentResponse() + if include_optional: + return GetInferenceDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + container_port = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, + healthcheck = '', + endpoint_certificate_authority = '', + env_vars = { + 'key' : '' + }, + command = [ + '' + ], + command_args = [ + '' + ] + ) + else: + return GetInferenceDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + container_port = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, + healthcheck = '', + endpoint_certificate_authority = '', + env_vars = { + 'key' : '' + }, + command = [ + '' + ], + command_args = [ + '' + ], + ) + """ + + def testGetInferenceDeploymentResponse(self): + """Test GetInferenceDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_payments_response.py b/platform_api_python_client/test/test_get_payments_response.py new file mode 100644 index 0000000..5856f6a --- /dev/null +++ b/platform_api_python_client/test/test_get_payments_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_payments_response import GetPaymentsResponse + +class TestGetPaymentsResponse(unittest.TestCase): + """GetPaymentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetPaymentsResponse: + """Test GetPaymentsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetPaymentsResponse` + """ + model = GetPaymentsResponse() + if include_optional: + return GetPaymentsResponse( + has_more = True, + payments = [ + None + ] + ) + else: + return GetPaymentsResponse( + has_more = True, + payments = [ + None + ], + ) + """ + + def testGetPaymentsResponse(self): + """Test GetPaymentsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_get_rag_deployment_response.py b/platform_api_python_client/test/test_get_rag_deployment_response.py new file mode 100644 index 0000000..b812e91 --- /dev/null +++ b/platform_api_python_client/test/test_get_rag_deployment_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse + +class TestGetRagDeploymentResponse(unittest.TestCase): + """GetRagDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetRagDeploymentResponse: + """Test GetRagDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetRagDeploymentResponse` + """ + model = GetRagDeploymentResponse() + if include_optional: + return GetRagDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + centml_api_key = '', + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + } + ) + else: + return GetRagDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 16, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + offloading_num = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + eager_execution = True, + num_scheduler_steps = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = 'draft', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + centml_api_key = '', + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + env_vars = { + 'key' : '' + }, + ) + """ + + def testGetRagDeploymentResponse(self): + """Test GetRagDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_hardware_instance_response.py b/platform_api_python_client/test/test_hardware_instance_response.py new file mode 100644 index 0000000..918b488 --- /dev/null +++ b/platform_api_python_client/test/test_hardware_instance_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse + +class TestHardwareInstanceResponse(unittest.TestCase): + """HardwareInstanceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HardwareInstanceResponse: + """Test HardwareInstanceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HardwareInstanceResponse` + """ + model = HardwareInstanceResponse() + if include_optional: + return HardwareInstanceResponse( + id = 56, + name = '', + gpu_type = '', + num_gpu = 56, + cpu = 56, + memory = 56, + cost_per_hr = 56 + ) + else: + return HardwareInstanceResponse( + id = 56, + name = '', + gpu_type = '', + num_gpu = 56, + cpu = 56, + memory = 56, + cost_per_hr = 56, + ) + """ + + def testHardwareInstanceResponse(self): + """Test HardwareInstanceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_http_validation_error.py b/platform_api_python_client/test/test_http_validation_error.py new file mode 100644 index 0000000..b87c23f --- /dev/null +++ b/platform_api_python_client/test/test_http_validation_error.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.http_validation_error import HTTPValidationError + +class TestHTTPValidationError(unittest.TestCase): + """HTTPValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HTTPValidationError: + """Test HTTPValidationError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HTTPValidationError` + """ + model = HTTPValidationError() + if include_optional: + return HTTPValidationError( + detail = [ + platform_api_python_client.models.validation_error.ValidationError( + loc = [ + null + ], + msg = '', + type = '', ) + ] + ) + else: + return HTTPValidationError( + ) + """ + + def testHTTPValidationError(self): + """Test HTTPValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_api_key_response.py b/platform_api_python_client/test/test_list_api_key_response.py new file mode 100644 index 0000000..829e245 --- /dev/null +++ b/platform_api_python_client/test/test_list_api_key_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse + +class TestListAPIKeyResponse(unittest.TestCase): + """ListAPIKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListAPIKeyResponse: + """Test ListAPIKeyResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListAPIKeyResponse` + """ + model = ListAPIKeyResponse() + if include_optional: + return ListAPIKeyResponse( + results = [ + platform_api_python_client.models.api_key_response.APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ListAPIKeyResponse( + results = [ + platform_api_python_client.models.api_key_response.APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testListAPIKeyResponse(self): + """Test ListAPIKeyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_c_serve_recipe_response.py b/platform_api_python_client/test/test_list_c_serve_recipe_response.py new file mode 100644 index 0000000..5408b10 --- /dev/null +++ b/platform_api_python_client/test/test_list_c_serve_recipe_response.py @@ -0,0 +1,226 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse + +class TestListCServeRecipeResponse(unittest.TestCase): + """ListCServeRecipeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListCServeRecipeResponse: + """Test ListCServeRecipeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListCServeRecipeResponse` + """ + model = ListCServeRecipeResponse() + if include_optional: + return ListCServeRecipeResponse( + results = [ + platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + best_value = , ) + ] + ) + else: + return ListCServeRecipeResponse( + results = [ + platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( + model = '', + max_model_len = 56, + is_embedding_model = True, + tokenizer = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + gpu_mem_util = 1.337, + block_size = 56, + swap_space = 56, + quantization = '', + dtype = 'auto', + cache_dtype = 'auto', + max_num_seqs = 56, + eager_execution = True, + use_flashinfer = True, + offloading_num = 1.337, + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_max = 56, + spec_prompt_lookup_min = 56, + use_prefix_caching = True, + use_chunked_prefill = True, + chunked_prefill_size = 56, + max_seq_len_to_capture = 56, + distributed_executor_backend = 'ray', + spec_max_batch_size = 56, + spec_max_seq_len = 56, + num_scheduler_steps = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + null + ] + ], + mean_ttft = [ + [ + null + ] + ], ), + best_value = , ) + ], + ) + """ + + def testListCServeRecipeResponse(self): + """Test ListCServeRecipeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_daily_bill_response.py b/platform_api_python_client/test/test_list_daily_bill_response.py new file mode 100644 index 0000000..cb1887a --- /dev/null +++ b/platform_api_python_client/test/test_list_daily_bill_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse + +class TestListDailyBillResponse(unittest.TestCase): + """ListDailyBillResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDailyBillResponse: + """Test ListDailyBillResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListDailyBillResponse` + """ + model = ListDailyBillResponse() + if include_optional: + return ListDailyBillResponse( + results = [ + platform_api_python_client.models.daily_bill_response.DailyBillResponse( + date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 1.337, ) + ] + ) + else: + return ListDailyBillResponse( + results = [ + platform_api_python_client.models.daily_bill_response.DailyBillResponse( + date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 1.337, ) + ], + ) + """ + + def testListDailyBillResponse(self): + """Test ListDailyBillResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_get_cluster_response.py b/platform_api_python_client/test/test_list_get_cluster_response.py new file mode 100644 index 0000000..dff2eca --- /dev/null +++ b/platform_api_python_client/test/test_list_get_cluster_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse + +class TestListGetClusterResponse(unittest.TestCase): + """ListGetClusterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGetClusterResponse: + """Test ListGetClusterResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGetClusterResponse` + """ + model = ListGetClusterResponse() + if include_optional: + return ListGetClusterResponse( + results = [ + platform_api_python_client.models.get_cluster_response.GetClusterResponse( + id = 56, + display_name = '', ) + ] + ) + else: + return ListGetClusterResponse( + results = [ + platform_api_python_client.models.get_cluster_response.GetClusterResponse( + id = 56, + display_name = '', ) + ], + ) + """ + + def testListGetClusterResponse(self): + """Test ListGetClusterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_get_deployment_response.py b/platform_api_python_client/test/test_list_get_deployment_response.py new file mode 100644 index 0000000..babbf61 --- /dev/null +++ b/platform_api_python_client/test/test_list_get_deployment_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse + +class TestListGetDeploymentResponse(unittest.TestCase): + """ListGetDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGetDeploymentResponse: + """Test ListGetDeploymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGetDeploymentResponse` + """ + model = ListGetDeploymentResponse() + if include_optional: + return ListGetDeploymentResponse( + results = [ + platform_api_python_client.models.get_deployment_response.GetDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, ) + ] + ) + else: + return ListGetDeploymentResponse( + results = [ + platform_api_python_client.models.get_deployment_response.GetDeploymentResponse( + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, ) + ], + ) + """ + + def testListGetDeploymentResponse(self): + """Test ListGetDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_hardware_instance_response.py b/platform_api_python_client/test/test_list_hardware_instance_response.py new file mode 100644 index 0000000..93b37dd --- /dev/null +++ b/platform_api_python_client/test/test_list_hardware_instance_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse + +class TestListHardwareInstanceResponse(unittest.TestCase): + """ListHardwareInstanceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListHardwareInstanceResponse: + """Test ListHardwareInstanceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListHardwareInstanceResponse` + """ + model = ListHardwareInstanceResponse() + if include_optional: + return ListHardwareInstanceResponse( + results = [ + platform_api_python_client.models.hardware_instance_response.HardwareInstanceResponse( + id = 56, + name = '', + gpu_type = '', + num_gpu = 56, + cpu = 56, + memory = 56, + cost_per_hr = 56, ) + ] + ) + else: + return ListHardwareInstanceResponse( + results = [ + platform_api_python_client.models.hardware_instance_response.HardwareInstanceResponse( + id = 56, + name = '', + gpu_type = '', + num_gpu = 56, + cpu = 56, + memory = 56, + cost_per_hr = 56, ) + ], + ) + """ + + def testListHardwareInstanceResponse(self): + """Test ListHardwareInstanceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_prebuilt_image_response.py b/platform_api_python_client/test/test_list_prebuilt_image_response.py new file mode 100644 index 0000000..97d43d0 --- /dev/null +++ b/platform_api_python_client/test/test_list_prebuilt_image_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse + +class TestListPrebuiltImageResponse(unittest.TestCase): + """ListPrebuiltImageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListPrebuiltImageResponse: + """Test ListPrebuiltImageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListPrebuiltImageResponse` + """ + model = ListPrebuiltImageResponse() + if include_optional: + return ListPrebuiltImageResponse( + results = [ + platform_api_python_client.models.prebuilt_image_response.PrebuiltImageResponse( + image_name = '', + label = '', + tags = [ + '' + ], + type = 'inference', + port = 56, + healthcheck = '', ) + ] + ) + else: + return ListPrebuiltImageResponse( + results = [ + platform_api_python_client.models.prebuilt_image_response.PrebuiltImageResponse( + image_name = '', + label = '', + tags = [ + '' + ], + type = 'inference', + port = 56, + healthcheck = '', ) + ], + ) + """ + + def testListPrebuiltImageResponse(self): + """Test ListPrebuiltImageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_list_user_vault_items_response.py b/platform_api_python_client/test/test_list_user_vault_items_response.py new file mode 100644 index 0000000..171b5a0 --- /dev/null +++ b/platform_api_python_client/test/test_list_user_vault_items_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse + +class TestListUserVaultItemsResponse(unittest.TestCase): + """ListUserVaultItemsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListUserVaultItemsResponse: + """Test ListUserVaultItemsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListUserVaultItemsResponse` + """ + model = ListUserVaultItemsResponse() + if include_optional: + return ListUserVaultItemsResponse( + results = [ + platform_api_python_client.models.user_vault_item.UserVaultItem( + type = 'env_vars', + key = '', + value = '', ) + ] + ) + else: + return ListUserVaultItemsResponse( + results = [ + platform_api_python_client.models.user_vault_item.UserVaultItem( + type = 'env_vars', + key = '', + value = '', ) + ], + ) + """ + + def testListUserVaultItemsResponse(self): + """Test ListUserVaultItemsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_metric.py b/platform_api_python_client/test/test_metric.py new file mode 100644 index 0000000..3708260 --- /dev/null +++ b/platform_api_python_client/test/test_metric.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.metric import Metric + +class TestMetric(unittest.TestCase): + """Metric unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetric(self): + """Test Metric""" + # inst = Metric() + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_prebuilt_image_response.py b/platform_api_python_client/test/test_prebuilt_image_response.py new file mode 100644 index 0000000..3e0d969 --- /dev/null +++ b/platform_api_python_client/test/test_prebuilt_image_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse + +class TestPrebuiltImageResponse(unittest.TestCase): + """PrebuiltImageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrebuiltImageResponse: + """Test PrebuiltImageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrebuiltImageResponse` + """ + model = PrebuiltImageResponse() + if include_optional: + return PrebuiltImageResponse( + image_name = '', + label = '', + tags = [ + '' + ], + type = 'inference', + port = 56, + healthcheck = '' + ) + else: + return PrebuiltImageResponse( + image_name = '', + label = '', + tags = [ + '' + ], + type = 'inference', + port = 56, + healthcheck = '', + ) + """ + + def testPrebuiltImageResponse(self): + """Test PrebuiltImageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_service_status.py b/platform_api_python_client/test/test_service_status.py new file mode 100644 index 0000000..9064bc1 --- /dev/null +++ b/platform_api_python_client/test/test_service_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.service_status import ServiceStatus + +class TestServiceStatus(unittest.TestCase): + """ServiceStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testServiceStatus(self): + """Test ServiceStatus""" + # inst = ServiceStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_user_support_email_request.py b/platform_api_python_client/test/test_user_support_email_request.py new file mode 100644 index 0000000..de221ee --- /dev/null +++ b/platform_api_python_client/test/test_user_support_email_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest + +class TestUserSupportEmailRequest(unittest.TestCase): + """UserSupportEmailRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserSupportEmailRequest: + """Test UserSupportEmailRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSupportEmailRequest` + """ + model = UserSupportEmailRequest() + if include_optional: + return UserSupportEmailRequest( + message = '', + subject = '', + send_to_sales = True + ) + else: + return UserSupportEmailRequest( + message = '', + subject = '', + send_to_sales = True, + ) + """ + + def testUserSupportEmailRequest(self): + """Test UserSupportEmailRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_user_vault_item_input.py b/platform_api_python_client/test/test_user_vault_item_input.py new file mode 100644 index 0000000..ec65d24 --- /dev/null +++ b/platform_api_python_client/test/test_user_vault_item_input.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput + +class TestUserVaultItemInput(unittest.TestCase): + """UserVaultItemInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserVaultItemInput: + """Test UserVaultItemInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserVaultItemInput` + """ + model = UserVaultItemInput() + if include_optional: + return UserVaultItemInput( + type = 'env_vars', + key = '', + value = '' + ) + else: + return UserVaultItemInput( + type = 'env_vars', + key = '', + ) + """ + + def testUserVaultItemInput(self): + """Test UserVaultItemInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_user_vault_item_output.py b/platform_api_python_client/test/test_user_vault_item_output.py new file mode 100644 index 0000000..3653a72 --- /dev/null +++ b/platform_api_python_client/test/test_user_vault_item_output.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput + +class TestUserVaultItemOutput(unittest.TestCase): + """UserVaultItemOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserVaultItemOutput: + """Test UserVaultItemOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserVaultItemOutput` + """ + model = UserVaultItemOutput() + if include_optional: + return UserVaultItemOutput( + type = 'env_vars', + key = '', + value = '' + ) + else: + return UserVaultItemOutput( + type = 'env_vars', + key = '', + value = '', + ) + """ + + def testUserVaultItemOutput(self): + """Test UserVaultItemOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_user_vault_type.py b/platform_api_python_client/test/test_user_vault_type.py new file mode 100644 index 0000000..108bf37 --- /dev/null +++ b/platform_api_python_client/test/test_user_vault_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.user_vault_type import UserVaultType + +class TestUserVaultType(unittest.TestCase): + """UserVaultType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserVaultType(self): + """Test UserVaultType""" + # inst = UserVaultType() + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_validation_error.py b/platform_api_python_client/test/test_validation_error.py new file mode 100644 index 0000000..bcf6cfd --- /dev/null +++ b/platform_api_python_client/test/test_validation_error.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + loc = [ + null + ], + msg = '', + type = '' + ) + else: + return ValidationError( + loc = [ + null + ], + msg = '', + type = '', + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/test/test_validation_error_loc_inner.py b/platform_api_python_client/test/test_validation_error_loc_inner.py new file mode 100644 index 0000000..cda1710 --- /dev/null +++ b/platform_api_python_client/test/test_validation_error_loc_inner.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner + +class TestValidationErrorLocInner(unittest.TestCase): + """ValidationErrorLocInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorLocInner: + """Test ValidationErrorLocInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorLocInner` + """ + model = ValidationErrorLocInner() + if include_optional: + return ValidationErrorLocInner( + ) + else: + return ValidationErrorLocInner( + ) + """ + + def testValidationErrorLocInner(self): + """Test ValidationErrorLocInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/platform_api_python_client/tox.ini b/platform_api_python_client/tox.ini new file mode 100644 index 0000000..2d64392 --- /dev/null +++ b/platform_api_python_client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=platform_api_python_client