From b1fcc906283be30082a937e31db56f42a5c75d65 Mon Sep 17 00:00:00 2001 From: platform CI Date: Thu, 2 Jul 2026 18:29:42 +0000 Subject: [PATCH] Update clients to latest platform release (4.18.0) --- README.md | 13 +- docs/CreateServiceAccountRequest.md | 31 + docs/CreateServiceAccountResponse.md | 35 + docs/EXTERNALApi.md | 412 ++++- docs/GenerateServiceAccountSecretResponse.md | 29 + docs/ListServiceAccountsResponse.md | 29 + docs/ServiceAccountResponse.md | 34 + docs/UpdateServiceAccountRequest.md | 31 + platform_api_python_client/__init__.py | 8 +- .../api/external_api.py | 1647 +++++++++++++++-- platform_api_python_client/api_client.py | 2 +- platform_api_python_client/configuration.py | 2 +- platform_api_python_client/models/__init__.py | 6 + .../models/create_service_account_request.py | 97 + .../models/create_service_account_response.py | 120 ++ ...enerate_service_account_secret_response.py | 87 + .../models/list_service_accounts_response.py | 95 + .../models/service_account_response.py | 118 ++ .../models/update_service_account_request.py | 107 ++ pyproject.toml | 2 +- setup.py | 2 +- test/test_create_service_account_request.py | 56 + test/test_create_service_account_response.py | 61 + test/test_external_api.py | 35 + ...enerate_service_account_secret_response.py | 52 + test/test_list_service_accounts_response.py | 72 + test/test_service_account_response.py | 59 + test/test_update_service_account_request.py | 55 + 28 files changed, 3099 insertions(+), 198 deletions(-) create mode 100644 docs/CreateServiceAccountRequest.md create mode 100644 docs/CreateServiceAccountResponse.md create mode 100644 docs/GenerateServiceAccountSecretResponse.md create mode 100644 docs/ListServiceAccountsResponse.md create mode 100644 docs/ServiceAccountResponse.md create mode 100644 docs/UpdateServiceAccountRequest.md create mode 100644 platform_api_python_client/models/create_service_account_request.py create mode 100644 platform_api_python_client/models/create_service_account_response.py create mode 100644 platform_api_python_client/models/generate_service_account_secret_response.py create mode 100644 platform_api_python_client/models/list_service_accounts_response.py create mode 100644 platform_api_python_client/models/service_account_response.py create mode 100644 platform_api_python_client/models/update_service_account_request.py create mode 100644 test/test_create_service_account_request.py create mode 100644 test/test_create_service_account_response.py create mode 100644 test/test_generate_service_account_secret_response.py create mode 100644 test/test_list_service_accounts_response.py create mode 100644 test/test_service_account_response.py create mode 100644 test/test_update_service_account_request.py diff --git a/README.md b/README.md index 9570150..8d1f7c2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 -- Package version: 4.16.1 +- Package version: 4.18.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -102,9 +102,12 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_inference_v3_deployment_deployments_inference_v3_post**](docs/EXTERNALApi.md#create_inference_v3_deployment_deployments_inference_v3_post) | **POST** /deployments/inference_v3 | Create Inference V3 Deployment *EXTERNALApi* | [**create_job_deployment_deployments_job_post**](docs/EXTERNALApi.md#create_job_deployment_deployments_job_post) | **POST** /deployments/job | Create Job Deployment *EXTERNALApi* | [**create_new_organization_organizations_post**](docs/EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization +*EXTERNALApi* | [**create_service_account_service_accounts_post**](docs/EXTERNALApi.md#create_service_account_service_accounts_post) | **POST** /service-accounts | Create Service Account *EXTERNALApi* | [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](docs/EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance +*EXTERNALApi* | [**delete_service_account_service_accounts_workos_id_delete**](docs/EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account *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* | [**download_url_file_url_download_post**](docs/EXTERNALApi.md#download_url_file_url_download_post) | **POST** /file_url/download | Download Url +*EXTERNALApi* | [**generate_service_account_secret_service_accounts_workos_id_secrets_post**](docs/EXTERNALApi.md#generate_service_account_secret_service_accounts_workos_id_secrets_post) | **POST** /service-accounts/{workos_id}/secrets | Generate Service Account Secret *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_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 @@ -128,6 +131,7 @@ Class | Method | HTTP request | Description *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* | [**invite_user_organizations_invite_post**](docs/EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User *EXTERNALApi* | [**list_cluster_capacity_capacity_get**](docs/EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity +*EXTERNALApi* | [**list_service_accounts_service_accounts_get**](docs/EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts *EXTERNALApi* | [**rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put**](docs/EXTERNALApi.md#rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put) | **PUT** /deployments/revisions/{deployment_id}/{revision_number} | Rollout Existing Revision *EXTERNALApi* | [**setup_stripe_customer_payments_setup_post**](docs/EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer *EXTERNALApi* | [**update_compute_deployment_deployments_compute_put**](docs/EXTERNALApi.md#update_compute_deployment_deployments_compute_put) | **PUT** /deployments/compute | Update Compute Deployment @@ -137,6 +141,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**update_deployment_status_v3_deployments_status_v3_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_v3_deployments_status_v3_deployment_id_put) | **PUT** /deployments/status_v3/{deployment_id} | Update Deployment Status V3 *EXTERNALApi* | [**update_inference_deployment_deployments_inference_put**](docs/EXTERNALApi.md#update_inference_deployment_deployments_inference_put) | **PUT** /deployments/inference | Update Inference Deployment *EXTERNALApi* | [**update_inference_v3_deployment_deployments_inference_v3_put**](docs/EXTERNALApi.md#update_inference_v3_deployment_deployments_inference_v3_put) | **PUT** /deployments/inference_v3 | Update Inference V3 Deployment +*EXTERNALApi* | [**update_service_account_service_accounts_workos_id_put**](docs/EXTERNALApi.md#update_service_account_service_accounts_workos_id_put) | **PUT** /service-accounts/{workos_id} | Update Service Account *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 *EXTERNALApi* | [**upload_url_file_url_upload_post**](docs/EXTERNALApi.md#upload_url_file_url_upload_post) | **POST** /file_url/upload | Upload Url @@ -161,6 +166,8 @@ Class | Method | HTTP request | Description - [CreateJobDeploymentResponse](docs/CreateJobDeploymentResponse.md) - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) - [CreateOrganizationResponse](docs/CreateOrganizationResponse.md) + - [CreateServiceAccountRequest](docs/CreateServiceAccountRequest.md) + - [CreateServiceAccountResponse](docs/CreateServiceAccountResponse.md) - [CreateUrlRequest](docs/CreateUrlRequest.md) - [CreateUrlResponse](docs/CreateUrlResponse.md) - [CreditsResponse](docs/CreditsResponse.md) @@ -173,6 +180,7 @@ Class | Method | HTTP request | Description - [DeploymentType](docs/DeploymentType.md) - [DeploymentUsage](docs/DeploymentUsage.md) - [DeploymentUsageValue](docs/DeploymentUsageValue.md) + - [GenerateServiceAccountSecretResponse](docs/GenerateServiceAccountSecretResponse.md) - [GetCServeV2DeploymentResponse](docs/GetCServeV2DeploymentResponse.md) - [GetCServeV3DeploymentResponse](docs/GetCServeV3DeploymentResponse.md) - [GetClusterResponse](docs/GetClusterResponse.md) @@ -197,6 +205,7 @@ Class | Method | HTTP request | Description - [ListGetDeploymentResponse](docs/ListGetDeploymentResponse.md) - [ListHardwareInstanceResponse](docs/ListHardwareInstanceResponse.md) - [ListPrebuiltImageResponse](docs/ListPrebuiltImageResponse.md) + - [ListServiceAccountsResponse](docs/ListServiceAccountsResponse.md) - [ListUserVaultItemsResponse](docs/ListUserVaultItemsResponse.md) - [Metric](docs/Metric.md) - [MetricsConfig](docs/MetricsConfig.md) @@ -206,9 +215,11 @@ Class | Method | HTTP request | Description - [RevisionPodDetails](docs/RevisionPodDetails.md) - [RolloutStatus](docs/RolloutStatus.md) - [RolloutStrategyParams](docs/RolloutStrategyParams.md) + - [ServiceAccountResponse](docs/ServiceAccountResponse.md) - [ServiceStatus](docs/ServiceStatus.md) - [UpdateDeploymentResponse](docs/UpdateDeploymentResponse.md) - [UpdateDeploymentStatusV3Request](docs/UpdateDeploymentStatusV3Request.md) + - [UpdateServiceAccountRequest](docs/UpdateServiceAccountRequest.md) - [UserVaultItem](docs/UserVaultItem.md) - [UserVaultType](docs/UserVaultType.md) - [ValidationError](docs/ValidationError.md) diff --git a/docs/CreateServiceAccountRequest.md b/docs/CreateServiceAccountRequest.md new file mode 100644 index 0000000..41d7210 --- /dev/null +++ b/docs/CreateServiceAccountRequest.md @@ -0,0 +1,31 @@ +# CreateServiceAccountRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**scopes** | **List[str]** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateServiceAccountRequest from a JSON string +create_service_account_request_instance = CreateServiceAccountRequest.from_json(json) +# print the JSON string representation of the object +print(CreateServiceAccountRequest.to_json()) + +# convert the object into a dict +create_service_account_request_dict = create_service_account_request_instance.to_dict() +# create an instance of CreateServiceAccountRequest from a dict +create_service_account_request_from_dict = CreateServiceAccountRequest.from_dict(create_service_account_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/docs/CreateServiceAccountResponse.md b/docs/CreateServiceAccountResponse.md new file mode 100644 index 0000000..b9bd734 --- /dev/null +++ b/docs/CreateServiceAccountResponse.md @@ -0,0 +1,35 @@ +# CreateServiceAccountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workos_id** | **str** | | +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**scopes** | **List[str]** | | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] +**client_secret** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateServiceAccountResponse from a JSON string +create_service_account_response_instance = CreateServiceAccountResponse.from_json(json) +# print the JSON string representation of the object +print(CreateServiceAccountResponse.to_json()) + +# convert the object into a dict +create_service_account_response_dict = create_service_account_response_instance.to_dict() +# create an instance of CreateServiceAccountResponse from a dict +create_service_account_response_from_dict = CreateServiceAccountResponse.from_dict(create_service_account_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/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 2e445d1..d5f1133 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -12,9 +12,12 @@ Method | HTTP request | Description [**create_inference_v3_deployment_deployments_inference_v3_post**](EXTERNALApi.md#create_inference_v3_deployment_deployments_inference_v3_post) | **POST** /deployments/inference_v3 | Create Inference V3 Deployment [**create_job_deployment_deployments_job_post**](EXTERNALApi.md#create_job_deployment_deployments_job_post) | **POST** /deployments/job | Create Job Deployment [**create_new_organization_organizations_post**](EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization +[**create_service_account_service_accounts_post**](EXTERNALApi.md#create_service_account_service_accounts_post) | **POST** /service-accounts | Create Service Account [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance +[**delete_service_account_service_accounts_workos_id_delete**](EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account [**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 [**download_url_file_url_download_post**](EXTERNALApi.md#download_url_file_url_download_post) | **POST** /file_url/download | Download Url +[**generate_service_account_secret_service_accounts_workos_id_secrets_post**](EXTERNALApi.md#generate_service_account_secret_service_accounts_workos_id_secrets_post) | **POST** /service-accounts/{workos_id}/secrets | Generate Service Account Secret [**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_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 @@ -38,6 +41,7 @@ Method | HTTP request | Description [**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage [**invite_user_organizations_invite_post**](EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User [**list_cluster_capacity_capacity_get**](EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity +[**list_service_accounts_service_accounts_get**](EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts [**rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put**](EXTERNALApi.md#rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put) | **PUT** /deployments/revisions/{deployment_id}/{revision_number} | Rollout Existing Revision [**setup_stripe_customer_payments_setup_post**](EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer [**update_compute_deployment_deployments_compute_put**](EXTERNALApi.md#update_compute_deployment_deployments_compute_put) | **PUT** /deployments/compute | Update Compute Deployment @@ -47,6 +51,7 @@ Method | HTTP request | Description [**update_deployment_status_v3_deployments_status_v3_deployment_id_put**](EXTERNALApi.md#update_deployment_status_v3_deployments_status_v3_deployment_id_put) | **PUT** /deployments/status_v3/{deployment_id} | Update Deployment Status V3 [**update_inference_deployment_deployments_inference_put**](EXTERNALApi.md#update_inference_deployment_deployments_inference_put) | **PUT** /deployments/inference | Update Inference Deployment [**update_inference_v3_deployment_deployments_inference_v3_put**](EXTERNALApi.md#update_inference_v3_deployment_deployments_inference_v3_put) | **PUT** /deployments/inference_v3 | Update Inference V3 Deployment +[**update_service_account_service_accounts_workos_id_put**](EXTERNALApi.md#update_service_account_service_accounts_workos_id_put) | **PUT** /service-accounts/{workos_id} | Update Service Account [**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 [**upload_url_file_url_upload_post**](EXTERNALApi.md#upload_url_file_url_upload_post) | **POST** /file_url/upload | Upload Url @@ -192,17 +197,15 @@ No authorization required [[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_v3_deployment_deployments_cserve_v3_post** -> CreateCServeV3DeploymentResponse create_cserve_v3_deployment_deployments_cserve_v3_post(create_c_serve_v3_deployment_request) +> CreateCServeV3DeploymentResponse create_cserve_v3_deployment_deployments_cserve_v3_post() Create Cserve V3 Deployment ### Example -* Bearer Authentication (HTTPBearer): ```python import platform_api_python_client -from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse from platform_api_python_client.rest import ApiException from pprint import pprint @@ -213,25 +216,15 @@ 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_v3_deployment_request = platform_api_python_client.CreateCServeV3DeploymentRequest() # CreateCServeV3DeploymentRequest | try: # Create Cserve V3 Deployment - api_response = api_instance.create_cserve_v3_deployment_deployments_cserve_v3_post(create_c_serve_v3_deployment_request) + api_response = api_instance.create_cserve_v3_deployment_deployments_cserve_v3_post() print("The response of EXTERNALApi->create_cserve_v3_deployment_deployments_cserve_v3_post:\n") pprint(api_response) except Exception as e: @@ -242,10 +235,7 @@ with platform_api_python_client.ApiClient(configuration) as api_client: ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_c_serve_v3_deployment_request** | [**CreateCServeV3DeploymentRequest**](CreateCServeV3DeploymentRequest.md)| | +This endpoint does not need any parameter. ### Return type @@ -253,11 +243,11 @@ Name | Type | Description | Notes ### Authorization -[HTTPBearer](../README.md#HTTPBearer) +No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -265,7 +255,6 @@ Name | Type | Description | Notes | 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) @@ -643,6 +632,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_service_account_service_accounts_post** +> CreateServiceAccountResponse create_service_account_service_accounts_post(create_service_account_request) + +Create Service Account + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest +from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse +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_service_account_request = platform_api_python_client.CreateServiceAccountRequest() # CreateServiceAccountRequest | + + try: + # Create Service Account + api_response = api_instance.create_service_account_service_accounts_post(create_service_account_request) + print("The response of EXTERNALApi->create_service_account_service_accounts_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_service_account_service_accounts_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_service_account_request** | [**CreateServiceAccountRequest**](CreateServiceAccountRequest.md)| | + +### Return type + +[**CreateServiceAccountResponse**](CreateServiceAccountResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 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_hardware_instance_hardware_instances_hardware_instance_id_delete** > delete_hardware_instance_hardware_instances_hardware_instance_id_delete(hardware_instance_id) @@ -717,6 +784,80 @@ void (empty response body) [[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_service_account_service_accounts_workos_id_delete** +> delete_service_account_service_accounts_workos_id_delete(workos_id) + +Delete Service Account + +### 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) + workos_id = 'workos_id_example' # str | + + try: + # Delete Service Account + api_instance.delete_service_account_service_accounts_workos_id_delete(workos_id) + except Exception as e: + print("Exception when calling EXTERNALApi->delete_service_account_service_accounts_workos_id_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workos_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 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) @@ -874,6 +1015,83 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **generate_service_account_secret_service_accounts_workos_id_secrets_post** +> GenerateServiceAccountSecretResponse generate_service_account_secret_service_accounts_workos_id_secrets_post(workos_id) + +Generate Service Account Secret + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse +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) + workos_id = 'workos_id_example' # str | + + try: + # Generate Service Account Secret + api_response = api_instance.generate_service_account_secret_service_accounts_workos_id_secrets_post(workos_id) + print("The response of EXTERNALApi->generate_service_account_secret_service_accounts_workos_id_secrets_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->generate_service_account_secret_service_accounts_workos_id_secrets_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workos_id** | **str**| | + +### Return type + +[**GenerateServiceAccountSecretResponse**](GenerateServiceAccountSecretResponse.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_all_user_vault_items_endpoint_user_vault_get** > ListUserVaultItemsResponse get_all_user_vault_items_endpoint_user_vault_get(type=type, search_query=search_query) @@ -2691,6 +2909,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_service_accounts_service_accounts_get** +> ListServiceAccountsResponse list_service_accounts_service_accounts_get() + +List Service Accounts + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse +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: + # List Service Accounts + api_response = api_instance.list_service_accounts_service_accounts_get() + print("The response of EXTERNALApi->list_service_accounts_service_accounts_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->list_service_accounts_service_accounts_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListServiceAccountsResponse**](ListServiceAccountsResponse.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) + # **rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put** > UpdateDeploymentResponse rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put(deployment_id, revision_number, rollout_strategy_params=rollout_strategy_params) @@ -3370,6 +3660,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_service_account_service_accounts_workos_id_put** +> ServiceAccountResponse update_service_account_service_accounts_workos_id_put(workos_id, update_service_account_request) + +Update Service Account + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.service_account_response import ServiceAccountResponse +from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest +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) + workos_id = 'workos_id_example' # str | + update_service_account_request = platform_api_python_client.UpdateServiceAccountRequest() # UpdateServiceAccountRequest | + + try: + # Update Service Account + api_response = api_instance.update_service_account_service_accounts_workos_id_put(workos_id, update_service_account_request) + print("The response of EXTERNALApi->update_service_account_service_accounts_workos_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->update_service_account_service_accounts_workos_id_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workos_id** | **str**| | + **update_service_account_request** | [**UpdateServiceAccountRequest**](UpdateServiceAccountRequest.md)| | + +### Return type + +[**ServiceAccountResponse**](ServiceAccountResponse.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) diff --git a/docs/GenerateServiceAccountSecretResponse.md b/docs/GenerateServiceAccountSecretResponse.md new file mode 100644 index 0000000..56c70bd --- /dev/null +++ b/docs/GenerateServiceAccountSecretResponse.md @@ -0,0 +1,29 @@ +# GenerateServiceAccountSecretResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | | + +## Example + +```python +from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GenerateServiceAccountSecretResponse from a JSON string +generate_service_account_secret_response_instance = GenerateServiceAccountSecretResponse.from_json(json) +# print the JSON string representation of the object +print(GenerateServiceAccountSecretResponse.to_json()) + +# convert the object into a dict +generate_service_account_secret_response_dict = generate_service_account_secret_response_instance.to_dict() +# create an instance of GenerateServiceAccountSecretResponse from a dict +generate_service_account_secret_response_from_dict = GenerateServiceAccountSecretResponse.from_dict(generate_service_account_secret_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/docs/ListServiceAccountsResponse.md b/docs/ListServiceAccountsResponse.md new file mode 100644 index 0000000..35e39f5 --- /dev/null +++ b/docs/ListServiceAccountsResponse.md @@ -0,0 +1,29 @@ +# ListServiceAccountsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ServiceAccountResponse]**](ServiceAccountResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListServiceAccountsResponse from a JSON string +list_service_accounts_response_instance = ListServiceAccountsResponse.from_json(json) +# print the JSON string representation of the object +print(ListServiceAccountsResponse.to_json()) + +# convert the object into a dict +list_service_accounts_response_dict = list_service_accounts_response_instance.to_dict() +# create an instance of ListServiceAccountsResponse from a dict +list_service_accounts_response_from_dict = ListServiceAccountsResponse.from_dict(list_service_accounts_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/docs/ServiceAccountResponse.md b/docs/ServiceAccountResponse.md new file mode 100644 index 0000000..23846bd --- /dev/null +++ b/docs/ServiceAccountResponse.md @@ -0,0 +1,34 @@ +# ServiceAccountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workos_id** | **str** | | +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**scopes** | **List[str]** | | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] + +## Example + +```python +from platform_api_python_client.models.service_account_response import ServiceAccountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceAccountResponse from a JSON string +service_account_response_instance = ServiceAccountResponse.from_json(json) +# print the JSON string representation of the object +print(ServiceAccountResponse.to_json()) + +# convert the object into a dict +service_account_response_dict = service_account_response_instance.to_dict() +# create an instance of ServiceAccountResponse from a dict +service_account_response_from_dict = ServiceAccountResponse.from_dict(service_account_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/docs/UpdateServiceAccountRequest.md b/docs/UpdateServiceAccountRequest.md new file mode 100644 index 0000000..baa0aa3 --- /dev/null +++ b/docs/UpdateServiceAccountRequest.md @@ -0,0 +1,31 @@ +# UpdateServiceAccountRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**scopes** | **List[str]** | | [optional] + +## Example + +```python +from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateServiceAccountRequest from a JSON string +update_service_account_request_instance = UpdateServiceAccountRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateServiceAccountRequest.to_json()) + +# convert the object into a dict +update_service_account_request_dict = update_service_account_request_instance.to_dict() +# create an instance of UpdateServiceAccountRequest from a dict +update_service_account_request_from_dict = UpdateServiceAccountRequest.from_dict(update_service_account_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/__init__.py b/platform_api_python_client/__init__.py index cd739f4..1bda0e9 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.16.1" +__version__ = "4.18.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -49,6 +49,8 @@ from platform_api_python_client.models.create_job_deployment_response import CreateJobDeploymentResponse from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse +from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest +from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse from platform_api_python_client.models.create_url_request import CreateUrlRequest from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse @@ -61,6 +63,7 @@ from platform_api_python_client.models.deployment_type import DeploymentType from platform_api_python_client.models.deployment_usage import DeploymentUsage from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse @@ -85,6 +88,7 @@ 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_service_accounts_response import ListServiceAccountsResponse 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.metrics_config import MetricsConfig @@ -94,9 +98,11 @@ from platform_api_python_client.models.revision_pod_details import RevisionPodDetails from platform_api_python_client.models.rollout_status import RolloutStatus from platform_api_python_client.models.rollout_strategy_params import RolloutStrategyParams +from platform_api_python_client.models.service_account_response import ServiceAccountResponse from platform_api_python_client.models.service_status import ServiceStatus from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request +from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index af5ed3c..da51151 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -31,6 +31,8 @@ from platform_api_python_client.models.create_job_deployment_response import CreateJobDeploymentResponse from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse +from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest +from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse from platform_api_python_client.models.create_url_request import CreateUrlRequest from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse @@ -38,6 +40,7 @@ from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse from platform_api_python_client.models.deployment_status_v3_response import DeploymentStatusV3Response from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse @@ -57,11 +60,14 @@ 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_service_accounts_response import ListServiceAccountsResponse 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.rollout_strategy_params import RolloutStrategyParams +from platform_api_python_client.models.service_account_response import ServiceAccountResponse from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request +from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType @@ -605,7 +611,6 @@ def _create_cserve_v2_deployment_deployments_cserve_v2_post_serialize( @validate_call def create_cserve_v3_deployment_deployments_cserve_v3_post( self, - create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -619,11 +624,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateCServeV3DeploymentResponse: - """Create Cserve V3 Deployment + """(Deprecated) Create Cserve V3 Deployment - :param create_c_serve_v3_deployment_request: (required) - :type create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest :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 @@ -645,9 +648,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /deployments/cserve_v3 is deprecated.", DeprecationWarning) _param = self._create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( - create_c_serve_v3_deployment_request=create_c_serve_v3_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -656,7 +659,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post( _response_types_map: Dict[str, Optional[str]] = { '200': "CreateCServeV3DeploymentResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -672,7 +674,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post( @validate_call def create_cserve_v3_deployment_deployments_cserve_v3_post_with_http_info( self, - create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -686,11 +687,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateCServeV3DeploymentResponse]: - """Create Cserve V3 Deployment + """(Deprecated) Create Cserve V3 Deployment - :param create_c_serve_v3_deployment_request: (required) - :type create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest :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 @@ -712,9 +711,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /deployments/cserve_v3 is deprecated.", DeprecationWarning) _param = self._create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( - create_c_serve_v3_deployment_request=create_c_serve_v3_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -723,7 +722,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "CreateCServeV3DeploymentResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -739,7 +737,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_with_http_info( @validate_call def create_cserve_v3_deployment_deployments_cserve_v3_post_without_preload_content( self, - create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -753,11 +750,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_without_preload_conte _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Cserve V3 Deployment + """(Deprecated) Create Cserve V3 Deployment - :param create_c_serve_v3_deployment_request: (required) - :type create_c_serve_v3_deployment_request: CreateCServeV3DeploymentRequest :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 @@ -779,9 +774,9 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_without_preload_conte :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /deployments/cserve_v3 is deprecated.", DeprecationWarning) _param = self._create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( - create_c_serve_v3_deployment_request=create_c_serve_v3_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -790,7 +785,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_without_preload_conte _response_types_map: Dict[str, Optional[str]] = { '200': "CreateCServeV3DeploymentResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -801,7 +795,6 @@ def create_cserve_v3_deployment_deployments_cserve_v3_post_without_preload_conte def _create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( self, - create_c_serve_v3_deployment_request, _request_auth, _content_type, _headers, @@ -827,8 +820,6 @@ def _create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_c_serve_v3_deployment_request is not None: - _body_params = create_c_serve_v3_deployment_request # set the HTTP header `Accept` @@ -839,23 +830,9 @@ def _create_cserve_v3_deployment_deployments_cserve_v3_post_serialize( ] ) - # 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( @@ -2218,9 +2195,9 @@ def _create_new_organization_organizations_post_serialize( @validate_call - def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( + def create_service_account_service_accounts_post( self, - hardware_instance_id: StrictInt, + create_service_account_request: CreateServiceAccountRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2233,12 +2210,12 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete Hardware Instance + ) -> CreateServiceAccountResponse: + """Create Service Account - :param hardware_instance_id: (required) - :type hardware_instance_id: int + :param create_service_account_request: (required) + :type create_service_account_request: CreateServiceAccountRequest :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 @@ -2261,8 +2238,8 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( - hardware_instance_id=hardware_instance_id, + _param = self._create_service_account_service_accounts_post_serialize( + create_service_account_request=create_service_account_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2270,7 +2247,7 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "CreateServiceAccountResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2285,9 +2262,9 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( @validate_call - def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with_http_info( + def create_service_account_service_accounts_post_with_http_info( self, - hardware_instance_id: StrictInt, + create_service_account_request: CreateServiceAccountRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2300,12 +2277,12 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Hardware Instance + ) -> ApiResponse[CreateServiceAccountResponse]: + """Create Service Account - :param hardware_instance_id: (required) - :type hardware_instance_id: int + :param create_service_account_request: (required) + :type create_service_account_request: CreateServiceAccountRequest :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 @@ -2328,8 +2305,8 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with :return: Returns the result object. """ # noqa: E501 - _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( - hardware_instance_id=hardware_instance_id, + _param = self._create_service_account_service_accounts_post_serialize( + create_service_account_request=create_service_account_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2337,7 +2314,7 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "CreateServiceAccountResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2352,9 +2329,9 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with @validate_call - def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_without_preload_content( + def create_service_account_service_accounts_post_without_preload_content( self, - hardware_instance_id: StrictInt, + create_service_account_request: CreateServiceAccountRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2368,11 +2345,11 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Hardware Instance + """Create Service Account - :param hardware_instance_id: (required) - :type hardware_instance_id: int + :param create_service_account_request: (required) + :type create_service_account_request: CreateServiceAccountRequest :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 @@ -2395,8 +2372,8 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with :return: Returns the result object. """ # noqa: E501 - _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( - hardware_instance_id=hardware_instance_id, + _param = self._create_service_account_service_accounts_post_serialize( + create_service_account_request=create_service_account_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2404,7 +2381,7 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "CreateServiceAccountResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2414,9 +2391,9 @@ def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with return response_data.response - def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( + def _create_service_account_service_accounts_post_serialize( self, - hardware_instance_id, + create_service_account_request, _request_auth, _content_type, _headers, @@ -2438,12 +2415,12 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser _body_params: Optional[bytes] = None # process the path parameters - if hardware_instance_id is not None: - _path_params['hardware_instance_id'] = hardware_instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if create_service_account_request is not None: + _body_params = create_service_account_request # set the HTTP header `Accept` @@ -2454,6 +2431,19 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser ] ) + # 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] = [ @@ -2461,8 +2451,8 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/hardware-instances/{hardware_instance_id}', + method='POST', + resource_path='/service-accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2479,9 +2469,9 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser @validate_call - def delete_user_vault_item_endpoint_user_vault_delete( + def delete_hardware_instance_hardware_instances_hardware_instance_id_delete( self, - user_vault_item: UserVaultItem, + hardware_instance_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2494,13 +2484,12 @@ def delete_user_vault_item_endpoint_user_vault_delete( _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 + ) -> None: + """Delete Hardware Instance - Delete an item of a specific type for the user. - :param user_vault_item: (required) - :type user_vault_item: UserVaultItem + :param hardware_instance_id: (required) + :type hardware_instance_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 @@ -2523,8 +2512,8 @@ def delete_user_vault_item_endpoint_user_vault_delete( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item=user_vault_item, + _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( + hardware_instance_id=hardware_instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2532,7 +2521,7 @@ def delete_user_vault_item_endpoint_user_vault_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2547,9 +2536,9 @@ def delete_user_vault_item_endpoint_user_vault_delete( @validate_call - def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( + def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_with_http_info( self, - user_vault_item: UserVaultItem, + hardware_instance_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2562,13 +2551,12 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( _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 + ) -> ApiResponse[None]: + """Delete Hardware Instance - Delete an item of a specific type for the user. - :param user_vault_item: (required) - :type user_vault_item: UserVaultItem + :param hardware_instance_id: (required) + :type hardware_instance_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 @@ -2591,8 +2579,8 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item=user_vault_item, + _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( + hardware_instance_id=hardware_instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2600,7 +2588,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2615,9 +2603,9 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( @validate_call - def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( + def delete_hardware_instance_hardware_instances_hardware_instance_id_delete_without_preload_content( self, - user_vault_item: UserVaultItem, + hardware_instance_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2631,12 +2619,11 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete User Vault Item Endpoint + """Delete Hardware Instance - Delete an item of a specific type for the user. - :param user_vault_item: (required) - :type user_vault_item: UserVaultItem + :param hardware_instance_id: (required) + :type hardware_instance_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 @@ -2659,8 +2646,8 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item=user_vault_item, + _param = self._delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( + hardware_instance_id=hardware_instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2668,7 +2655,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2678,9 +2665,9 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( return response_data.response - def _delete_user_vault_item_endpoint_user_vault_delete_serialize( + def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_serialize( self, - user_vault_item, + hardware_instance_id, _request_auth, _content_type, _headers, @@ -2702,12 +2689,12 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( _body_params: Optional[bytes] = None # process the path parameters + if hardware_instance_id is not None: + _path_params['hardware_instance_id'] = hardware_instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_vault_item is not None: - _body_params = user_vault_item # set the HTTP header `Accept` @@ -2718,19 +2705,6 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( ] ) - # 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] = [ @@ -2739,7 +2713,7 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/user_vault', + resource_path='/hardware-instances/{hardware_instance_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2756,9 +2730,9 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( @validate_call - def download_url_file_url_download_post( + def delete_service_account_service_accounts_workos_id_delete( self, - create_url_request: CreateUrlRequest, + workos_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2771,12 +2745,12 @@ def download_url_file_url_download_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateUrlResponse: - """Download Url + ) -> None: + """Delete Service Account - :param create_url_request: (required) - :type create_url_request: CreateUrlRequest + :param workos_id: (required) + :type workos_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 @@ -2799,8 +2773,8 @@ def download_url_file_url_download_post( :return: Returns the result object. """ # noqa: E501 - _param = self._download_url_file_url_download_post_serialize( - create_url_request=create_url_request, + _param = self._delete_service_account_service_accounts_workos_id_delete_serialize( + workos_id=workos_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2808,7 +2782,7 @@ def download_url_file_url_download_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateUrlResponse", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2823,9 +2797,9 @@ def download_url_file_url_download_post( @validate_call - def download_url_file_url_download_post_with_http_info( + def delete_service_account_service_accounts_workos_id_delete_with_http_info( self, - create_url_request: CreateUrlRequest, + workos_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2838,12 +2812,12 @@ def download_url_file_url_download_post_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateUrlResponse]: - """Download Url + ) -> ApiResponse[None]: + """Delete Service Account - :param create_url_request: (required) - :type create_url_request: CreateUrlRequest + :param workos_id: (required) + :type workos_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 @@ -2866,8 +2840,8 @@ def download_url_file_url_download_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._download_url_file_url_download_post_serialize( - create_url_request=create_url_request, + _param = self._delete_service_account_service_accounts_workos_id_delete_serialize( + workos_id=workos_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2875,7 +2849,7 @@ def download_url_file_url_download_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateUrlResponse", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2890,9 +2864,9 @@ def download_url_file_url_download_post_with_http_info( @validate_call - def download_url_file_url_download_post_without_preload_content( + def delete_service_account_service_accounts_workos_id_delete_without_preload_content( self, - create_url_request: CreateUrlRequest, + workos_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2906,11 +2880,11 @@ def download_url_file_url_download_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download Url + """Delete Service Account - :param create_url_request: (required) - :type create_url_request: CreateUrlRequest + :param workos_id: (required) + :type workos_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 @@ -2933,8 +2907,8 @@ def download_url_file_url_download_post_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._download_url_file_url_download_post_serialize( - create_url_request=create_url_request, + _param = self._delete_service_account_service_accounts_workos_id_delete_serialize( + workos_id=workos_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2942,7 +2916,7 @@ def download_url_file_url_download_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateUrlResponse", + '204': None, '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2952,9 +2926,821 @@ def download_url_file_url_download_post_without_preload_content( return response_data.response - def _download_url_file_url_download_post_serialize( + def _delete_service_account_service_accounts_workos_id_delete_serialize( self, - create_url_request, + workos_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 workos_id is not None: + _path_params['workos_id'] = workos_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='/service-accounts/{workos_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: UserVaultItem, + _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: (required) + :type user_vault_item: UserVaultItem + :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=user_vault_item, + _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: UserVaultItem, + _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: (required) + :type user_vault_item: UserVaultItem + :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=user_vault_item, + _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: UserVaultItem, + _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: (required) + :type user_vault_item: UserVaultItem + :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=user_vault_item, + _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, + _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 is not None: + _body_params = user_vault_item + + + # 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 download_url_file_url_download_post( + self, + create_url_request: CreateUrlRequest, + _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, + ) -> CreateUrlResponse: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :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._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '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 download_url_file_url_download_post_with_http_info( + self, + create_url_request: CreateUrlRequest, + _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[CreateUrlResponse]: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :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._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '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 download_url_file_url_download_post_without_preload_content( + self, + create_url_request: CreateUrlRequest, + _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: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :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._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _download_url_file_url_download_post_serialize( + self, + create_url_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_url_request is not None: + _body_params = create_url_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='/file_url/download', + 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 generate_service_account_secret_service_accounts_workos_id_secrets_post( + self, + workos_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, + ) -> GenerateServiceAccountSecretResponse: + """Generate Service Account Secret + + + :param workos_id: (required) + :type workos_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._generate_service_account_secret_service_accounts_workos_id_secrets_post_serialize( + workos_id=workos_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenerateServiceAccountSecretResponse", + '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 generate_service_account_secret_service_accounts_workos_id_secrets_post_with_http_info( + self, + workos_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[GenerateServiceAccountSecretResponse]: + """Generate Service Account Secret + + + :param workos_id: (required) + :type workos_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._generate_service_account_secret_service_accounts_workos_id_secrets_post_serialize( + workos_id=workos_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenerateServiceAccountSecretResponse", + '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 generate_service_account_secret_service_accounts_workos_id_secrets_post_without_preload_content( + self, + workos_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: + """Generate Service Account Secret + + + :param workos_id: (required) + :type workos_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._generate_service_account_secret_service_accounts_workos_id_secrets_post_serialize( + workos_id=workos_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenerateServiceAccountSecretResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_service_account_secret_service_accounts_workos_id_secrets_post_serialize( + self, + workos_id, _request_auth, _content_type, _headers, @@ -2976,12 +3762,12 @@ def _download_url_file_url_download_post_serialize( _body_params: Optional[bytes] = None # process the path parameters + if workos_id is not None: + _path_params['workos_id'] = workos_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_url_request is not None: - _body_params = create_url_request # set the HTTP header `Accept` @@ -2992,19 +3778,6 @@ def _download_url_file_url_download_post_serialize( ] ) - # 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] = [ @@ -3013,7 +3786,7 @@ def _download_url_file_url_download_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/file_url/download', + resource_path='/service-accounts/{workos_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9314,8 +10087,258 @@ def list_cluster_capacity_capacity_get_without_preload_content( Return GPU capacity breakdown for accessible clusters. When *cluster_id* is supplied only that cluster is included (if accessible). Clusters whose Prometheus data is unavailable are omitted from the results rather than failing the entire request. - :param cluster_id: - :type cluster_id: int + :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._list_cluster_capacity_capacity_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': "ListClusterCapacityResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_cluster_capacity_capacity_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='/capacity', + 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 list_service_accounts_service_accounts_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, + ) -> ListServiceAccountsResponse: + """List Service Accounts + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_service_accounts_service_accounts_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListServiceAccountsResponse", + } + 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 list_service_accounts_service_accounts_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[ListServiceAccountsResponse]: + """List Service Accounts + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_service_accounts_service_accounts_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListServiceAccountsResponse", + } + 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 list_service_accounts_service_accounts_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: + """List Service Accounts + + :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 @@ -9338,8 +10361,7 @@ def list_cluster_capacity_capacity_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_cluster_capacity_capacity_get_serialize( - cluster_id=cluster_id, + _param = self._list_service_accounts_service_accounts_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9347,8 +10369,7 @@ def list_cluster_capacity_capacity_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListClusterCapacityResponse", - '422': "HTTPValidationError", + '200': "ListServiceAccountsResponse", } response_data = self.api_client.call_api( *_param, @@ -9357,9 +10378,8 @@ def list_cluster_capacity_capacity_get_without_preload_content( return response_data.response - def _list_cluster_capacity_capacity_get_serialize( + def _list_service_accounts_service_accounts_get_serialize( self, - cluster_id, _request_auth, _content_type, _headers, @@ -9382,10 +10402,6 @@ def _list_cluster_capacity_capacity_get_serialize( # 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 @@ -9407,7 +10423,7 @@ def _list_cluster_capacity_capacity_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/capacity', + resource_path='/service-accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11914,6 +12930,295 @@ def _update_inference_v3_deployment_deployments_inference_v3_put_serialize( + @validate_call + def update_service_account_service_accounts_workos_id_put( + self, + workos_id: StrictStr, + update_service_account_request: UpdateServiceAccountRequest, + _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, + ) -> ServiceAccountResponse: + """Update Service Account + + + :param workos_id: (required) + :type workos_id: str + :param update_service_account_request: (required) + :type update_service_account_request: UpdateServiceAccountRequest + :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_service_account_service_accounts_workos_id_put_serialize( + workos_id=workos_id, + update_service_account_request=update_service_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ServiceAccountResponse", + '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_service_account_service_accounts_workos_id_put_with_http_info( + self, + workos_id: StrictStr, + update_service_account_request: UpdateServiceAccountRequest, + _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[ServiceAccountResponse]: + """Update Service Account + + + :param workos_id: (required) + :type workos_id: str + :param update_service_account_request: (required) + :type update_service_account_request: UpdateServiceAccountRequest + :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_service_account_service_accounts_workos_id_put_serialize( + workos_id=workos_id, + update_service_account_request=update_service_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ServiceAccountResponse", + '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_service_account_service_accounts_workos_id_put_without_preload_content( + self, + workos_id: StrictStr, + update_service_account_request: UpdateServiceAccountRequest, + _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 Service Account + + + :param workos_id: (required) + :type workos_id: str + :param update_service_account_request: (required) + :type update_service_account_request: UpdateServiceAccountRequest + :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_service_account_service_accounts_workos_id_put_serialize( + workos_id=workos_id, + update_service_account_request=update_service_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ServiceAccountResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_service_account_service_accounts_workos_id_put_serialize( + self, + workos_id, + update_service_account_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 workos_id is not None: + _path_params['workos_id'] = workos_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_service_account_request is not None: + _body_params = update_service_account_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='/service-accounts/{workos_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, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 34e5cb2..b355bcd 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.16.1/python' + self.user_agent = 'OpenAPI-Generator/4.18.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index b52a31a..7f7469e 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -392,7 +392,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.16.1".\ + "SDK Package Version: 4.18.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index 5ee05a3..5fec179 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -32,6 +32,8 @@ from platform_api_python_client.models.create_job_deployment_response import CreateJobDeploymentResponse from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse +from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest +from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse from platform_api_python_client.models.create_url_request import CreateUrlRequest from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse @@ -44,6 +46,7 @@ from platform_api_python_client.models.deployment_type import DeploymentType from platform_api_python_client.models.deployment_usage import DeploymentUsage from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse @@ -68,6 +71,7 @@ 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_service_accounts_response import ListServiceAccountsResponse 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.metrics_config import MetricsConfig @@ -77,9 +81,11 @@ from platform_api_python_client.models.revision_pod_details import RevisionPodDetails from platform_api_python_client.models.rollout_status import RolloutStatus from platform_api_python_client.models.rollout_strategy_params import RolloutStrategyParams +from platform_api_python_client.models.service_account_response import ServiceAccountResponse from platform_api_python_client.models.service_status import ServiceStatus from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request +from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError diff --git a/platform_api_python_client/models/create_service_account_request.py b/platform_api_python_client/models/create_service_account_request.py new file mode 100644 index 0000000..2ad1259 --- /dev/null +++ b/platform_api_python_client/models/create_service_account_request.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, Field, 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 CreateServiceAccountRequest(BaseModel): + """ + CreateServiceAccountRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + description: Optional[StrictStr] = None + scopes: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "description", "scopes"] + + 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 CreateServiceAccountRequest 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 description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateServiceAccountRequest 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"), + "description": obj.get("description"), + "scopes": obj.get("scopes") + }) + return _obj + + diff --git a/platform_api_python_client/models/create_service_account_response.py b/platform_api_python_client/models/create_service_account_response.py new file mode 100644 index 0000000..5df1c40 --- /dev/null +++ b/platform_api_python_client/models/create_service_account_response.py @@ -0,0 +1,120 @@ +# 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateServiceAccountResponse(BaseModel): + """ + CreateServiceAccountResponse + """ # noqa: E501 + workos_id: StrictStr + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + scopes: Optional[List[StrictStr]] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + client_secret: StrictStr + __properties: ClassVar[List[str]] = ["workos_id", "name", "description", "scopes", "created_at", "updated_at", "client_secret"] + + 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 CreateServiceAccountResponse 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 name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updated_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateServiceAccountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workos_id": obj.get("workos_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "scopes": obj.get("scopes"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "client_secret": obj.get("client_secret") + }) + return _obj + + diff --git a/platform_api_python_client/models/generate_service_account_secret_response.py b/platform_api_python_client/models/generate_service_account_secret_response.py new file mode 100644 index 0000000..cbeeab7 --- /dev/null +++ b/platform_api_python_client/models/generate_service_account_secret_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 GenerateServiceAccountSecretResponse(BaseModel): + """ + GenerateServiceAccountSecretResponse + """ # noqa: E501 + client_secret: StrictStr + __properties: ClassVar[List[str]] = ["client_secret"] + + 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 GenerateServiceAccountSecretResponse 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 GenerateServiceAccountSecretResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "client_secret": obj.get("client_secret") + }) + return _obj + + diff --git a/platform_api_python_client/models/list_service_accounts_response.py b/platform_api_python_client/models/list_service_accounts_response.py new file mode 100644 index 0000000..3b85fa7 --- /dev/null +++ b/platform_api_python_client/models/list_service_accounts_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.service_account_response import ServiceAccountResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListServiceAccountsResponse(BaseModel): + """ + ListServiceAccountsResponse + """ # noqa: E501 + results: List[ServiceAccountResponse] + __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 ListServiceAccountsResponse 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 ListServiceAccountsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ServiceAccountResponse.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/models/service_account_response.py b/platform_api_python_client/models/service_account_response.py new file mode 100644 index 0000000..2722519 --- /dev/null +++ b/platform_api_python_client/models/service_account_response.py @@ -0,0 +1,118 @@ +# 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ServiceAccountResponse(BaseModel): + """ + ServiceAccountResponse + """ # noqa: E501 + workos_id: StrictStr + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + scopes: Optional[List[StrictStr]] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["workos_id", "name", "description", "scopes", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServiceAccountResponse 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 name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updated_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceAccountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workos_id": obj.get("workos_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "scopes": obj.get("scopes"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/platform_api_python_client/models/update_service_account_request.py b/platform_api_python_client/models/update_service_account_request.py new file mode 100644 index 0000000..b65004f --- /dev/null +++ b/platform_api_python_client/models/update_service_account_request.py @@ -0,0 +1,107 @@ +# 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, 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 UpdateServiceAccountRequest(BaseModel): + """ + UpdateServiceAccountRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[StrictStr] = None + scopes: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "description", "scopes"] + + 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 UpdateServiceAccountRequest 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 name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if scopes (nullable) is None + # and model_fields_set contains the field + if self.scopes is None and "scopes" in self.model_fields_set: + _dict['scopes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateServiceAccountRequest 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"), + "description": obj.get("description"), + "scopes": obj.get("scopes") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 84bd301..59e20b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.16.1" +version = "4.18.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 47f3698..3f0b2d9 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.16.1" +VERSION = "4.18.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_service_account_request.py b/test/test_create_service_account_request.py new file mode 100644 index 0000000..4c55746 --- /dev/null +++ b/test/test_create_service_account_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.create_service_account_request import CreateServiceAccountRequest + +class TestCreateServiceAccountRequest(unittest.TestCase): + """CreateServiceAccountRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateServiceAccountRequest: + """Test CreateServiceAccountRequest + 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 `CreateServiceAccountRequest` + """ + model = CreateServiceAccountRequest() + if include_optional: + return CreateServiceAccountRequest( + name = '0', + description = '', + scopes = [ + '' + ] + ) + else: + return CreateServiceAccountRequest( + name = '0', + ) + """ + + def testCreateServiceAccountRequest(self): + """Test CreateServiceAccountRequest""" + # 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/test/test_create_service_account_response.py b/test/test_create_service_account_response.py new file mode 100644 index 0000000..a9ff693 --- /dev/null +++ b/test/test_create_service_account_response.py @@ -0,0 +1,61 @@ +# 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_service_account_response import CreateServiceAccountResponse + +class TestCreateServiceAccountResponse(unittest.TestCase): + """CreateServiceAccountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateServiceAccountResponse: + """Test CreateServiceAccountResponse + 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 `CreateServiceAccountResponse` + """ + model = CreateServiceAccountResponse() + if include_optional: + return CreateServiceAccountResponse( + workos_id = '', + name = '', + description = '', + scopes = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + client_secret = '' + ) + else: + return CreateServiceAccountResponse( + workos_id = '', + client_secret = '', + ) + """ + + def testCreateServiceAccountResponse(self): + """Test CreateServiceAccountResponse""" + # 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/test/test_external_api.py b/test/test_external_api.py index 39513d4..fee6211 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -82,6 +82,13 @@ def test_create_new_organization_organizations_post(self) -> None: """ pass + def test_create_service_account_service_accounts_post(self) -> None: + """Test case for create_service_account_service_accounts_post + + Create Service Account + """ + pass + def test_delete_hardware_instance_hardware_instances_hardware_instance_id_delete(self) -> None: """Test case for delete_hardware_instance_hardware_instances_hardware_instance_id_delete @@ -89,6 +96,13 @@ def test_delete_hardware_instance_hardware_instances_hardware_instance_id_delete """ pass + def test_delete_service_account_service_accounts_workos_id_delete(self) -> None: + """Test case for delete_service_account_service_accounts_workos_id_delete + + Delete Service Account + """ + pass + def test_delete_user_vault_item_endpoint_user_vault_delete(self) -> None: """Test case for delete_user_vault_item_endpoint_user_vault_delete @@ -103,6 +117,13 @@ def test_download_url_file_url_download_post(self) -> None: """ pass + def test_generate_service_account_secret_service_accounts_workos_id_secrets_post(self) -> None: + """Test case for generate_service_account_secret_service_accounts_workos_id_secrets_post + + Generate Service Account Secret + """ + pass + def test_get_all_user_vault_items_endpoint_user_vault_get(self) -> None: """Test case for get_all_user_vault_items_endpoint_user_vault_get @@ -264,6 +285,13 @@ def test_list_cluster_capacity_capacity_get(self) -> None: """ pass + def test_list_service_accounts_service_accounts_get(self) -> None: + """Test case for list_service_accounts_service_accounts_get + + List Service Accounts + """ + pass + def test_rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put(self) -> None: """Test case for rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put @@ -327,6 +355,13 @@ def test_update_inference_v3_deployment_deployments_inference_v3_put(self) -> No """ pass + def test_update_service_account_service_accounts_workos_id_put(self) -> None: + """Test case for update_service_account_service_accounts_workos_id_put + + Update Service Account + """ + pass + def test_update_user_vault_item_endpoint_user_vault_put(self) -> None: """Test case for update_user_vault_item_endpoint_user_vault_put diff --git a/test/test_generate_service_account_secret_response.py b/test/test_generate_service_account_secret_response.py new file mode 100644 index 0000000..477099e --- /dev/null +++ b/test/test_generate_service_account_secret_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.generate_service_account_secret_response import GenerateServiceAccountSecretResponse + +class TestGenerateServiceAccountSecretResponse(unittest.TestCase): + """GenerateServiceAccountSecretResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GenerateServiceAccountSecretResponse: + """Test GenerateServiceAccountSecretResponse + 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 `GenerateServiceAccountSecretResponse` + """ + model = GenerateServiceAccountSecretResponse() + if include_optional: + return GenerateServiceAccountSecretResponse( + client_secret = '' + ) + else: + return GenerateServiceAccountSecretResponse( + client_secret = '', + ) + """ + + def testGenerateServiceAccountSecretResponse(self): + """Test GenerateServiceAccountSecretResponse""" + # 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/test/test_list_service_accounts_response.py b/test/test_list_service_accounts_response.py new file mode 100644 index 0000000..ac762f0 --- /dev/null +++ b/test/test_list_service_accounts_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_service_accounts_response import ListServiceAccountsResponse + +class TestListServiceAccountsResponse(unittest.TestCase): + """ListServiceAccountsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListServiceAccountsResponse: + """Test ListServiceAccountsResponse + 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 `ListServiceAccountsResponse` + """ + model = ListServiceAccountsResponse() + if include_optional: + return ListServiceAccountsResponse( + results = [ + platform_api_python_client.models.service_account_response.ServiceAccountResponse( + workos_id = '', + name = '', + description = '', + scopes = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ListServiceAccountsResponse( + results = [ + platform_api_python_client.models.service_account_response.ServiceAccountResponse( + workos_id = '', + name = '', + description = '', + scopes = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testListServiceAccountsResponse(self): + """Test ListServiceAccountsResponse""" + # 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/test/test_service_account_response.py b/test/test_service_account_response.py new file mode 100644 index 0000000..6c4f276 --- /dev/null +++ b/test/test_service_account_response.py @@ -0,0 +1,59 @@ +# 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_account_response import ServiceAccountResponse + +class TestServiceAccountResponse(unittest.TestCase): + """ServiceAccountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceAccountResponse: + """Test ServiceAccountResponse + 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 `ServiceAccountResponse` + """ + model = ServiceAccountResponse() + if include_optional: + return ServiceAccountResponse( + workos_id = '', + name = '', + description = '', + scopes = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ServiceAccountResponse( + workos_id = '', + ) + """ + + def testServiceAccountResponse(self): + """Test ServiceAccountResponse""" + # 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/test/test_update_service_account_request.py b/test/test_update_service_account_request.py new file mode 100644 index 0000000..d31a37a --- /dev/null +++ b/test/test_update_service_account_request.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.update_service_account_request import UpdateServiceAccountRequest + +class TestUpdateServiceAccountRequest(unittest.TestCase): + """UpdateServiceAccountRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateServiceAccountRequest: + """Test UpdateServiceAccountRequest + 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 `UpdateServiceAccountRequest` + """ + model = UpdateServiceAccountRequest() + if include_optional: + return UpdateServiceAccountRequest( + name = '0', + description = '', + scopes = [ + '' + ] + ) + else: + return UpdateServiceAccountRequest( + ) + """ + + def testUpdateServiceAccountRequest(self): + """Test UpdateServiceAccountRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()