diff --git a/README.md b/README.md index c98cef8..236d835 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -# platform-api-client +# platform-api-python-client No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 - Package version: 1.0.0 +- Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -17,13 +18,13 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/CentML/platform_api_python_client.git +pip install git+https://github.com/centml/platform/client.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/CentML/platform_api_python_client.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/centml/platform/client.git`) Then import the package: ```python -import platform_api_client +import platform_api_python_client ``` ### Setuptools @@ -37,7 +38,7 @@ python setup.py install --user Then import the package: ```python -import platform_api_client +import platform_api_python_client ``` ### Tests @@ -50,13 +51,13 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python -import platform_api_client -from platform_api_client.rest import ApiException +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -66,24 +67,24 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - create_compute_deployment_request = platform_api_client.CreateComputeDeploymentRequest() # CreateComputeDeploymentRequest | + api_instance = platform_api_python_client.EXTERNALApi(api_client) + feedback_request = platform_api_python_client.FeedbackRequest() # FeedbackRequest | try: - # Create Compute Deployment - api_response = api_instance.create_compute_deployment_deployments_compute_post(create_compute_deployment_request) - print("The response of EXTERNALApi->create_compute_deployment_deployments_compute_post:\n") + # Add Feedback Request + api_response = api_instance.add_feedback_request_support_feedback_post(feedback_request) + print("The response of EXTERNALApi->add_feedback_request_support_feedback_post:\n") pprint(api_response) except ApiException as e: - print("Exception when calling EXTERNALApi->create_compute_deployment_deployments_compute_post: %s\n" % e) + print("Exception when calling EXTERNALApi->add_feedback_request_support_feedback_post: %s\n" % e) ``` @@ -93,54 +94,82 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*EXTERNALApi* | [**create_compute_deployment_deployments_compute_post**](docs/EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment -*EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +*EXTERNALApi* | [**add_feedback_request_support_feedback_post**](docs/EXTERNALApi.md#add_feedback_request_support_feedback_post) | **POST** /support/feedback | Add Feedback Request +*EXTERNALApi* | [**create_api_key_credentials_api_key_post**](docs/EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key +*EXTERNALApi* | [**create_compute_deployment_deployments_v2_compute_post**](docs/EXTERNALApi.md#create_compute_deployment_deployments_v2_compute_post) | **POST** /deployments/v2/compute | Create Compute Deployment +*EXTERNALApi* | [**create_cserve_deployment_deployments_v2_cserve_post**](docs/EXTERNALApi.md#create_cserve_deployment_deployments_v2_cserve_post) | **POST** /deployments/v2/cserve | Create Cserve Deployment +*EXTERNALApi* | [**create_hardware_request_support_hardware_request_post**](docs/EXTERNALApi.md#create_hardware_request_support_hardware_request_post) | **POST** /support/hardware-request | Create Hardware Request +*EXTERNALApi* | [**create_inference_deployment_deployments_v2_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_v2_inference_post) | **POST** /deployments/v2/inference | Create Inference Deployment *EXTERNALApi* | [**create_payment_payments_post**](docs/EXTERNALApi.md#create_payment_payments_post) | **POST** /payments | Create Payment *EXTERNALApi* | [**create_payment_setup_payments_setup_post**](docs/EXTERNALApi.md#create_payment_setup_payments_setup_post) | **POST** /payments/setup | Create Payment Setup -*EXTERNALApi* | [**create_training_deployment_deployments_training_post**](docs/EXTERNALApi.md#create_training_deployment_deployments_training_post) | **POST** /deployments/training | Create Training Deployment +*EXTERNALApi* | [**delete_api_key_credentials_api_key_id_delete**](docs/EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key *EXTERNALApi* | [**delete_payment_method_payments_methods_payment_method_delete**](docs/EXTERNALApi.md#delete_payment_method_payments_methods_payment_method_delete) | **DELETE** /payments/methods/{payment_method} | Delete Payment Method -*EXTERNALApi* | [**get_compute_deployment_deployments_compute_deployment_id_get**](docs/EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment +*EXTERNALApi* | [**get_api_keys_credentials_api_key_get**](docs/EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys +*EXTERNALApi* | [**get_clusters_clusters_get**](docs/EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters +*EXTERNALApi* | [**get_compute_deployment_deployments_v2_compute_deployment_id_get**](docs/EXTERNALApi.md#get_compute_deployment_deployments_v2_compute_deployment_id_get) | **GET** /deployments/v2/compute/{deployment_id} | Get Compute Deployment *EXTERNALApi* | [**get_credits_credits_get**](docs/EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits -*EXTERNALApi* | [**get_deployment_status_deployments_status_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_status_deployments_status_deployment_id_get) | **GET** /deployments/status/{deployment_id} | Get Deployment Status -*EXTERNALApi* | [**get_deployments_deployments_get**](docs/EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments +*EXTERNALApi* | [**get_cserve_deployment_deployments_v2_cserve_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_deployment_deployments_v2_cserve_deployment_id_get) | **GET** /deployments/v2/cserve/{deployment_id} | Get Cserve Deployment +*EXTERNALApi* | [**get_cserve_recipe_deployments_v2_cserve_recipes_get**](docs/EXTERNALApi.md#get_cserve_recipe_deployments_v2_cserve_recipes_get) | **GET** /deployments/v2/cserve/recipes | Get Cserve Recipe +*EXTERNALApi* | [**get_deployment_logs_deployments_logs_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs +*EXTERNALApi* | [**get_deployment_status_deployments_v2_status_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_status_deployments_v2_status_deployment_id_get) | **GET** /deployments/v2/status/{deployment_id} | Get Deployment Status +*EXTERNALApi* | [**get_deployments_deployments_v2_get**](docs/EXTERNALApi.md#get_deployments_deployments_v2_get) | **GET** /deployments/v2 | Get Deployments *EXTERNALApi* | [**get_hardware_instances_hardware_instances_get**](docs/EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances -*EXTERNALApi* | [**get_inference_deployment_deployments_inference_deployment_id_get**](docs/EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment +*EXTERNALApi* | [**get_hardware_instances_hardware_instances_v2_get**](docs/EXTERNALApi.md#get_hardware_instances_hardware_instances_v2_get) | **GET** /hardware-instances/v2 | Get Hardware Instances +*EXTERNALApi* | [**get_inference_deployment_deployments_v2_inference_deployment_id_get**](docs/EXTERNALApi.md#get_inference_deployment_deployments_v2_inference_deployment_id_get) | **GET** /deployments/v2/inference/{deployment_id} | Get Inference Deployment *EXTERNALApi* | [**get_payment_methods_payments_methods_get**](docs/EXTERNALApi.md#get_payment_methods_payments_methods_get) | **GET** /payments/methods | Get Payment Methods *EXTERNALApi* | [**get_prebuilt_images_prebuilt_images_get**](docs/EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images -*EXTERNALApi* | [**get_training_deployment_deployments_training_deployment_id_get**](docs/EXTERNALApi.md#get_training_deployment_deployments_training_deployment_id_get) | **GET** /deployments/training/{deployment_id} | Get Training Deployment -*EXTERNALApi* | [**update_deployment_status_deployments_status_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status +*EXTERNALApi* | [**get_usage_daily_bills_get**](docs/EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage +*EXTERNALApi* | [**get_usage_deployments_usage_deployment_id_get**](docs/EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage +*EXTERNALApi* | [**update_deployment_status_deployments_v2_status_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_deployments_v2_status_deployment_id_put) | **PUT** /deployments/v2/status/{deployment_id} | Update Deployment Status ## Documentation For Models - - [AuthSecret](docs/AuthSecret.md) + - [APIKeyRequest](docs/APIKeyRequest.md) + - [APIKeyResponse](docs/APIKeyResponse.md) + - [AddHardwareRequest](docs/AddHardwareRequest.md) + - [CServeRecipeInput](docs/CServeRecipeInput.md) + - [CServeRecipeOutput](docs/CServeRecipeOutput.md) + - [CServeRecipePerf](docs/CServeRecipePerf.md) + - [CServeRecipeResponse](docs/CServeRecipeResponse.md) - [ClientSecretResponse](docs/ClientSecretResponse.md) - - [CreateComputeDeploymentRequest](docs/CreateComputeDeploymentRequest.md) + - [CreateCServeDeploymentRequest](docs/CreateCServeDeploymentRequest.md) + - [CreateCServeDeploymentResponse](docs/CreateCServeDeploymentResponse.md) - [CreateComputeDeploymentResponse](docs/CreateComputeDeploymentResponse.md) - - [CreateInferenceDeploymentRequest](docs/CreateInferenceDeploymentRequest.md) + - [CreateComputeDeploymentV2Request](docs/CreateComputeDeploymentV2Request.md) - [CreateInferenceDeploymentResponse](docs/CreateInferenceDeploymentResponse.md) + - [CreateInferenceDeploymentV2Request](docs/CreateInferenceDeploymentV2Request.md) - [CreatePaymentRequest](docs/CreatePaymentRequest.md) - - [CreateTrainingDeploymentRequest](docs/CreateTrainingDeploymentRequest.md) - - [CreateTrainingDeploymentResponse](docs/CreateTrainingDeploymentResponse.md) - [CreditsResponse](docs/CreditsResponse.md) + - [DailyBillResponse](docs/DailyBillResponse.md) - [DeploymentStatus](docs/DeploymentStatus.md) - [DeploymentStatusRequest](docs/DeploymentStatusRequest.md) - - [DeploymentStatusResponse](docs/DeploymentStatusResponse.md) + - [DeploymentStatusResponseV2](docs/DeploymentStatusResponseV2.md) - [DeploymentType](docs/DeploymentType.md) - - [EndpointReadyState](docs/EndpointReadyState.md) - - [GetComputeDeploymentResponse](docs/GetComputeDeploymentResponse.md) - - [GetDeploymentResponse](docs/GetDeploymentResponse.md) - - [GetInferenceDeploymentResponse](docs/GetInferenceDeploymentResponse.md) - - [GetTrainingDeploymentResponse](docs/GetTrainingDeploymentResponse.md) + - [DeploymentUsageValue](docs/DeploymentUsageValue.md) + - [FeedbackRequest](docs/FeedbackRequest.md) + - [GetCServeDeploymentResponse](docs/GetCServeDeploymentResponse.md) + - [GetClusterResponse](docs/GetClusterResponse.md) + - [GetComputeV2DeploymentResponse](docs/GetComputeV2DeploymentResponse.md) + - [GetDeploymentLogResponse](docs/GetDeploymentLogResponse.md) + - [GetDeploymentUsageResponse](docs/GetDeploymentUsageResponse.md) + - [GetDeploymentV2Response](docs/GetDeploymentV2Response.md) + - [GetInferenceV2DeploymentResponse](docs/GetInferenceV2DeploymentResponse.md) - [HTTPValidationError](docs/HTTPValidationError.md) - [HardwareInstanceResponse](docs/HardwareInstanceResponse.md) - - [ListGetDeploymentResponse](docs/ListGetDeploymentResponse.md) + - [HealthStatus](docs/HealthStatus.md) + - [ListAPIKeyResponse](docs/ListAPIKeyResponse.md) + - [ListCServeRecipeResponse](docs/ListCServeRecipeResponse.md) + - [ListDailyBillResponse](docs/ListDailyBillResponse.md) + - [ListGetClusterResponse](docs/ListGetClusterResponse.md) + - [ListGetDeploymentV2Response](docs/ListGetDeploymentV2Response.md) - [ListHardwareInstanceResponse](docs/ListHardwareInstanceResponse.md) - [ListPaymentMethodResponse](docs/ListPaymentMethodResponse.md) - [ListPrebuiltImageResponse](docs/ListPrebuiltImageResponse.md) - - [LocationInner](docs/LocationInner.md) + - [Metric](docs/Metric.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) diff --git a/docs/APIKeyRequest.md b/docs/APIKeyRequest.md new file mode 100644 index 0000000..30fac6c --- /dev/null +++ b/docs/APIKeyRequest.md @@ -0,0 +1,29 @@ +# APIKeyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from platform_api_python_client.models.api_key_request import APIKeyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of APIKeyRequest from a JSON string +api_key_request_instance = APIKeyRequest.from_json(json) +# print the JSON string representation of the object +print(APIKeyRequest.to_json()) + +# convert the object into a dict +api_key_request_dict = api_key_request_instance.to_dict() +# create an instance of APIKeyRequest from a dict +api_key_request_from_dict = APIKeyRequest.from_dict(api_key_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/APIKeyResponse.md b/docs/APIKeyResponse.md new file mode 100644 index 0000000..53df35e --- /dev/null +++ b/docs/APIKeyResponse.md @@ -0,0 +1,31 @@ +# APIKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**id** | **str** | | +**created_at** | **datetime** | | + +## Example + +```python +from platform_api_python_client.models.api_key_response import APIKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of APIKeyResponse from a JSON string +api_key_response_instance = APIKeyResponse.from_json(json) +# print the JSON string representation of the object +print(APIKeyResponse.to_json()) + +# convert the object into a dict +api_key_response_dict = api_key_response_instance.to_dict() +# create an instance of APIKeyResponse from a dict +api_key_response_from_dict = APIKeyResponse.from_dict(api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddHardwareRequest.md b/docs/AddHardwareRequest.md new file mode 100644 index 0000000..08dcc52 --- /dev/null +++ b/docs/AddHardwareRequest.md @@ -0,0 +1,29 @@ +# AddHardwareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | + +## Example + +```python +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddHardwareRequest from a JSON string +add_hardware_request_instance = AddHardwareRequest.from_json(json) +# print the JSON string representation of the object +print(AddHardwareRequest.to_json()) + +# convert the object into a dict +add_hardware_request_dict = add_hardware_request_instance.to_dict() +# create an instance of AddHardwareRequest from a dict +add_hardware_request_from_dict = AddHardwareRequest.from_dict(add_hardware_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/AuthSecret.md b/docs/AuthSecret.md deleted file mode 100644 index 40b6663..0000000 --- a/docs/AuthSecret.md +++ /dev/null @@ -1,30 +0,0 @@ -# AuthSecret - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | -**password** | **str** | | - -## Example - -```python -from platform_api_client.models.auth_secret import AuthSecret - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthSecret from a JSON string -auth_secret_instance = AuthSecret.from_json(json) -# print the JSON string representation of the object -print AuthSecret.to_json() - -# convert the object into a dict -auth_secret_dict = auth_secret_instance.to_dict() -# create an instance of AuthSecret from a dict -auth_secret_form_dict = auth_secret.from_dict(auth_secret_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/CServeRecipeInput.md b/docs/CServeRecipeInput.md new file mode 100644 index 0000000..e886926 --- /dev/null +++ b/docs/CServeRecipeInput.md @@ -0,0 +1,49 @@ +# CServeRecipeInput + +Base class for deployment planner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**is_embedding_model** | **bool** | | [optional] [default to False] +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**block_size** | **int** | | [optional] [default to 32] +**swap_space** | **int** | | [optional] [default to 0] +**gpu_mem_util** | **float** | | [optional] [default to 0.95] +**max_num_seqs** | **int** | | [optional] [default to 256] +**use_prefix_caching** | **bool** | | [optional] +**offloading_num** | **int** | | [optional] [default to 0] +**use_flashinfer** | **bool** | | [optional] [default to False] +**max_model_len** | **int** | | [optional] +**dtype** | **str** | | [optional] [default to 'auto'] +**tokenizer** | **str** | | [optional] +**spec_proposer** | **str** | | [optional] +**spec_draft_model** | **str** | | [optional] +**spec_tokens** | **int** | | [optional] +**spec_prompt_lookup_min** | **int** | | [optional] +**spec_prompt_lookup_max** | **int** | | [optional] +**seed** | **int** | | [optional] [default to 0] + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_input import CServeRecipeInput + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipeInput from a JSON string +c_serve_recipe_input_instance = CServeRecipeInput.from_json(json) +# print the JSON string representation of the object +print(CServeRecipeInput.to_json()) + +# convert the object into a dict +c_serve_recipe_input_dict = c_serve_recipe_input_instance.to_dict() +# create an instance of CServeRecipeInput from a dict +c_serve_recipe_input_from_dict = CServeRecipeInput.from_dict(c_serve_recipe_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CServeRecipeOutput.md b/docs/CServeRecipeOutput.md new file mode 100644 index 0000000..d0aa70e --- /dev/null +++ b/docs/CServeRecipeOutput.md @@ -0,0 +1,49 @@ +# CServeRecipeOutput + +Base class for deployment planner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**is_embedding_model** | **bool** | | [default to False] +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**block_size** | **int** | | [default to 32] +**swap_space** | **int** | | [default to 0] +**gpu_mem_util** | **float** | | [default to 0.95] +**max_num_seqs** | **int** | | [default to 256] +**use_prefix_caching** | **bool** | | +**offloading_num** | **int** | | [default to 0] +**use_flashinfer** | **bool** | | [default to False] +**max_model_len** | **int** | | +**dtype** | **str** | | [default to 'auto'] +**tokenizer** | **str** | | +**spec_proposer** | **str** | | +**spec_draft_model** | **str** | | +**spec_tokens** | **int** | | +**spec_prompt_lookup_min** | **int** | | +**spec_prompt_lookup_max** | **int** | | +**seed** | **int** | | [default to 0] + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_output import CServeRecipeOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipeOutput from a JSON string +c_serve_recipe_output_instance = CServeRecipeOutput.from_json(json) +# print the JSON string representation of the object +print(CServeRecipeOutput.to_json()) + +# convert the object into a dict +c_serve_recipe_output_dict = c_serve_recipe_output_instance.to_dict() +# create an instance of CServeRecipeOutput from a dict +c_serve_recipe_output_from_dict = CServeRecipeOutput.from_dict(c_serve_recipe_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CServeRecipePerf.md b/docs/CServeRecipePerf.md new file mode 100644 index 0000000..5cf69fd --- /dev/null +++ b/docs/CServeRecipePerf.md @@ -0,0 +1,32 @@ +# CServeRecipePerf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipe** | [**CServeRecipeOutput**](CServeRecipeOutput.md) | | +**hardware_instance_id** | **int** | | +**output_tp** | **List[List[str]]** | | +**mean_ttft** | **List[List[str]]** | | + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipePerf from a JSON string +c_serve_recipe_perf_instance = CServeRecipePerf.from_json(json) +# print the JSON string representation of the object +print(CServeRecipePerf.to_json()) + +# convert the object into a dict +c_serve_recipe_perf_dict = c_serve_recipe_perf_instance.to_dict() +# create an instance of CServeRecipePerf from a dict +c_serve_recipe_perf_from_dict = CServeRecipePerf.from_dict(c_serve_recipe_perf_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CServeRecipeResponse.md b/docs/CServeRecipeResponse.md new file mode 100644 index 0000000..4a42fda --- /dev/null +++ b/docs/CServeRecipeResponse.md @@ -0,0 +1,33 @@ +# CServeRecipeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**cluster_id** | **int** | | +**fastest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | +**cheapest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | +**best_value** | [**CServeRecipePerf**](CServeRecipePerf.md) | | + +## Example + +```python +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CServeRecipeResponse from a JSON string +c_serve_recipe_response_instance = CServeRecipeResponse.from_json(json) +# print the JSON string representation of the object +print(CServeRecipeResponse.to_json()) + +# convert the object into a dict +c_serve_recipe_response_dict = c_serve_recipe_response_instance.to_dict() +# create an instance of CServeRecipeResponse from a dict +c_serve_recipe_response_from_dict = CServeRecipeResponse.from_dict(c_serve_recipe_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClientSecretResponse.md b/docs/ClientSecretResponse.md index b7ef023..5950168 100644 --- a/docs/ClientSecretResponse.md +++ b/docs/ClientSecretResponse.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.client_secret_response import ClientSecretResponse # TODO update the JSON string below json = "{}" # create an instance of ClientSecretResponse from a JSON string client_secret_response_instance = ClientSecretResponse.from_json(json) # print the JSON string representation of the object -print ClientSecretResponse.to_json() +print(ClientSecretResponse.to_json()) # convert the object into a dict client_secret_response_dict = client_secret_response_instance.to_dict() # create an instance of ClientSecretResponse from a dict -client_secret_response_form_dict = client_secret_response.from_dict(client_secret_response_dict) +client_secret_response_from_dict = ClientSecretResponse.from_dict(client_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/CreateCServeDeploymentRequest.md b/docs/CreateCServeDeploymentRequest.md new file mode 100644 index 0000000..802450d --- /dev/null +++ b/docs/CreateCServeDeploymentRequest.md @@ -0,0 +1,37 @@ +# CreateCServeDeploymentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**recipe** | [**CServeRecipeInput**](CServeRecipeInput.md) | | +**hf_token** | **str** | | +**endpoint_certificate_authority** | **str** | | [optional] +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeDeploymentRequest from a JSON string +create_c_serve_deployment_request_instance = CreateCServeDeploymentRequest.from_json(json) +# print the JSON string representation of the object +print(CreateCServeDeploymentRequest.to_json()) + +# convert the object into a dict +create_c_serve_deployment_request_dict = create_c_serve_deployment_request_instance.to_dict() +# create an instance of CreateCServeDeploymentRequest from a dict +create_c_serve_deployment_request_from_dict = CreateCServeDeploymentRequest.from_dict(create_c_serve_deployment_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCServeDeploymentResponse.md b/docs/CreateCServeDeploymentResponse.md new file mode 100644 index 0000000..4d5de2e --- /dev/null +++ b/docs/CreateCServeDeploymentResponse.md @@ -0,0 +1,31 @@ +# CreateCServeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**created_at** | **datetime** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCServeDeploymentResponse from a JSON string +create_c_serve_deployment_response_instance = CreateCServeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(CreateCServeDeploymentResponse.to_json()) + +# convert the object into a dict +create_c_serve_deployment_response_dict = create_c_serve_deployment_response_instance.to_dict() +# create an instance of CreateCServeDeploymentResponse from a dict +create_c_serve_deployment_response_from_dict = CreateCServeDeploymentResponse.from_dict(create_c_serve_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateComputeDeploymentRequest.md b/docs/CreateComputeDeploymentRequest.md deleted file mode 100644 index 9afbc26..0000000 --- a/docs/CreateComputeDeploymentRequest.md +++ /dev/null @@ -1,36 +0,0 @@ -# CreateComputeDeploymentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**image_url** | **str** | | -**hardware_instance_id** | **int** | | -**env_vars** | **Dict[str, str]** | | [optional] -**secrets** | [**AuthSecret**](AuthSecret.md) | | [optional] -**ssh_key** | **str** | | [optional] -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateComputeDeploymentRequest from a JSON string -create_compute_deployment_request_instance = CreateComputeDeploymentRequest.from_json(json) -# print the JSON string representation of the object -print CreateComputeDeploymentRequest.to_json() - -# convert the object into a dict -create_compute_deployment_request_dict = create_compute_deployment_request_instance.to_dict() -# create an instance of CreateComputeDeploymentRequest from a dict -create_compute_deployment_request_form_dict = create_compute_deployment_request.from_dict(create_compute_deployment_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateComputeDeploymentResponse.md b/docs/CreateComputeDeploymentResponse.md index 1a2cdbe..298b492 100644 --- a/docs/CreateComputeDeploymentResponse.md +++ b/docs/CreateComputeDeploymentResponse.md @@ -8,23 +8,24 @@ Name | Type | Description | Notes **id** | **int** | | **created_at** | **datetime** | | **endpoint_url** | **str** | | +**port** | **int** | | ## Example ```python -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse # TODO update the JSON string below json = "{}" # create an instance of CreateComputeDeploymentResponse from a JSON string create_compute_deployment_response_instance = CreateComputeDeploymentResponse.from_json(json) # print the JSON string representation of the object -print CreateComputeDeploymentResponse.to_json() +print(CreateComputeDeploymentResponse.to_json()) # convert the object into a dict create_compute_deployment_response_dict = create_compute_deployment_response_instance.to_dict() # create an instance of CreateComputeDeploymentResponse from a dict -create_compute_deployment_response_form_dict = create_compute_deployment_response.from_dict(create_compute_deployment_response_dict) +create_compute_deployment_response_from_dict = CreateComputeDeploymentResponse.from_dict(create_compute_deployment_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateComputeDeploymentV2Request.md b/docs/CreateComputeDeploymentV2Request.md new file mode 100644 index 0000000..3a46387 --- /dev/null +++ b/docs/CreateComputeDeploymentV2Request.md @@ -0,0 +1,34 @@ +# CreateComputeDeploymentV2Request + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**image_url** | **str** | | +**ssh_public_key** | **str** | | [optional] +**ssh_password** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateComputeDeploymentV2Request from a JSON string +create_compute_deployment_v2_request_instance = CreateComputeDeploymentV2Request.from_json(json) +# print the JSON string representation of the object +print(CreateComputeDeploymentV2Request.to_json()) + +# convert the object into a dict +create_compute_deployment_v2_request_dict = create_compute_deployment_v2_request_instance.to_dict() +# create an instance of CreateComputeDeploymentV2Request from a dict +create_compute_deployment_v2_request_from_dict = CreateComputeDeploymentV2Request.from_dict(create_compute_deployment_v2_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/CreateInferenceDeploymentRequest.md b/docs/CreateInferenceDeploymentRequest.md deleted file mode 100644 index 8456f48..0000000 --- a/docs/CreateInferenceDeploymentRequest.md +++ /dev/null @@ -1,38 +0,0 @@ -# CreateInferenceDeploymentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**image_url** | **str** | | -**hardware_instance_id** | **int** | | -**env_vars** | **Dict[str, str]** | | [optional] -**secrets** | [**AuthSecret**](AuthSecret.md) | | [optional] -**port** | **int** | | -**min_replicas** | **int** | | -**max_replicas** | **int** | | -**timeout** | **int** | | [optional] -**healthcheck** | **str** | | [optional] - -## Example - -```python -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateInferenceDeploymentRequest from a JSON string -create_inference_deployment_request_instance = CreateInferenceDeploymentRequest.from_json(json) -# print the JSON string representation of the object -print CreateInferenceDeploymentRequest.to_json() - -# convert the object into a dict -create_inference_deployment_request_dict = create_inference_deployment_request_instance.to_dict() -# create an instance of CreateInferenceDeploymentRequest from a dict -create_inference_deployment_request_form_dict = create_inference_deployment_request.from_dict(create_inference_deployment_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateInferenceDeploymentResponse.md b/docs/CreateInferenceDeploymentResponse.md index 845d3b8..54fcc6b 100644 --- a/docs/CreateInferenceDeploymentResponse.md +++ b/docs/CreateInferenceDeploymentResponse.md @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse # TODO update the JSON string below json = "{}" # create an instance of CreateInferenceDeploymentResponse from a JSON string create_inference_deployment_response_instance = CreateInferenceDeploymentResponse.from_json(json) # print the JSON string representation of the object -print CreateInferenceDeploymentResponse.to_json() +print(CreateInferenceDeploymentResponse.to_json()) # convert the object into a dict create_inference_deployment_response_dict = create_inference_deployment_response_instance.to_dict() # create an instance of CreateInferenceDeploymentResponse from a dict -create_inference_deployment_response_form_dict = create_inference_deployment_response.from_dict(create_inference_deployment_response_dict) +create_inference_deployment_response_from_dict = CreateInferenceDeploymentResponse.from_dict(create_inference_deployment_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateInferenceDeploymentV2Request.md b/docs/CreateInferenceDeploymentV2Request.md new file mode 100644 index 0000000..cd312bf --- /dev/null +++ b/docs/CreateInferenceDeploymentV2Request.md @@ -0,0 +1,41 @@ +# CreateInferenceDeploymentV2Request + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**hardware_instance_id** | **int** | | +**image_url** | **str** | | +**port** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | [optional] +**healthcheck** | **str** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] +**command** | **List[str]** | | [optional] +**command_args** | **List[str]** | | [optional] +**endpoint_certificate_authority** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInferenceDeploymentV2Request from a JSON string +create_inference_deployment_v2_request_instance = CreateInferenceDeploymentV2Request.from_json(json) +# print the JSON string representation of the object +print(CreateInferenceDeploymentV2Request.to_json()) + +# convert the object into a dict +create_inference_deployment_v2_request_dict = create_inference_deployment_v2_request_instance.to_dict() +# create an instance of CreateInferenceDeploymentV2Request from a dict +create_inference_deployment_v2_request_from_dict = CreateInferenceDeploymentV2Request.from_dict(create_inference_deployment_v2_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/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md index 860df37..aa8c6c2 100644 --- a/docs/CreatePaymentRequest.md +++ b/docs/CreatePaymentRequest.md @@ -11,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.create_payment_request import CreatePaymentRequest +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest # TODO update the JSON string below json = "{}" # create an instance of CreatePaymentRequest from a JSON string create_payment_request_instance = CreatePaymentRequest.from_json(json) # print the JSON string representation of the object -print CreatePaymentRequest.to_json() +print(CreatePaymentRequest.to_json()) # convert the object into a dict create_payment_request_dict = create_payment_request_instance.to_dict() # create an instance of CreatePaymentRequest from a dict -create_payment_request_form_dict = create_payment_request.from_dict(create_payment_request_dict) +create_payment_request_from_dict = CreatePaymentRequest.from_dict(create_payment_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/CreateTrainingDeploymentRequest.md b/docs/CreateTrainingDeploymentRequest.md deleted file mode 100644 index ce69e3b..0000000 --- a/docs/CreateTrainingDeploymentRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# CreateTrainingDeploymentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**image_url** | **str** | | -**hardware_instance_id** | **int** | | -**env_vars** | **Dict[str, str]** | | [optional] -**secrets** | [**AuthSecret**](AuthSecret.md) | | [optional] - -## Example - -```python -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTrainingDeploymentRequest from a JSON string -create_training_deployment_request_instance = CreateTrainingDeploymentRequest.from_json(json) -# print the JSON string representation of the object -print CreateTrainingDeploymentRequest.to_json() - -# convert the object into a dict -create_training_deployment_request_dict = create_training_deployment_request_instance.to_dict() -# create an instance of CreateTrainingDeploymentRequest from a dict -create_training_deployment_request_form_dict = create_training_deployment_request.from_dict(create_training_deployment_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateTrainingDeploymentResponse.md b/docs/CreateTrainingDeploymentResponse.md deleted file mode 100644 index 2727987..0000000 --- a/docs/CreateTrainingDeploymentResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateTrainingDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**created_at** | **datetime** | | -**endpoint_url** | **str** | | - -## Example - -```python -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTrainingDeploymentResponse from a JSON string -create_training_deployment_response_instance = CreateTrainingDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print CreateTrainingDeploymentResponse.to_json() - -# convert the object into a dict -create_training_deployment_response_dict = create_training_deployment_response_instance.to_dict() -# create an instance of CreateTrainingDeploymentResponse from a dict -create_training_deployment_response_form_dict = create_training_deployment_response.from_dict(create_training_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreditsResponse.md b/docs/CreditsResponse.md index 77e03fb..3f049c6 100644 --- a/docs/CreditsResponse.md +++ b/docs/CreditsResponse.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.credits_response import CreditsResponse # TODO update the JSON string below json = "{}" # create an instance of CreditsResponse from a JSON string credits_response_instance = CreditsResponse.from_json(json) # print the JSON string representation of the object -print CreditsResponse.to_json() +print(CreditsResponse.to_json()) # convert the object into a dict credits_response_dict = credits_response_instance.to_dict() # create an instance of CreditsResponse from a dict -credits_response_form_dict = credits_response.from_dict(credits_response_dict) +credits_response_from_dict = CreditsResponse.from_dict(credits_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DailyBillResponse.md b/docs/DailyBillResponse.md new file mode 100644 index 0000000..6ba7af2 --- /dev/null +++ b/docs/DailyBillResponse.md @@ -0,0 +1,30 @@ +# DailyBillResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **date** | | +**credits** | **int** | | + +## Example + +```python +from platform_api_python_client.models.daily_bill_response import DailyBillResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DailyBillResponse from a JSON string +daily_bill_response_instance = DailyBillResponse.from_json(json) +# print the JSON string representation of the object +print(DailyBillResponse.to_json()) + +# convert the object into a dict +daily_bill_response_dict = daily_bill_response_instance.to_dict() +# create an instance of DailyBillResponse from a dict +daily_bill_response_from_dict = DailyBillResponse.from_dict(daily_bill_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeploymentStatusRequest.md b/docs/DeploymentStatusRequest.md index 296bc0a..866a8db 100644 --- a/docs/DeploymentStatusRequest.md +++ b/docs/DeploymentStatusRequest.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest # TODO update the JSON string below json = "{}" # create an instance of DeploymentStatusRequest from a JSON string deployment_status_request_instance = DeploymentStatusRequest.from_json(json) # print the JSON string representation of the object -print DeploymentStatusRequest.to_json() +print(DeploymentStatusRequest.to_json()) # convert the object into a dict deployment_status_request_dict = deployment_status_request_instance.to_dict() # create an instance of DeploymentStatusRequest from a dict -deployment_status_request_form_dict = deployment_status_request.from_dict(deployment_status_request_dict) +deployment_status_request_from_dict = DeploymentStatusRequest.from_dict(deployment_status_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeploymentStatusResponse.md b/docs/DeploymentStatusResponse.md deleted file mode 100644 index 9e2dbe0..0000000 --- a/docs/DeploymentStatusResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# DeploymentStatusResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**service_status** | [**EndpointReadyState**](EndpointReadyState.md) | | -**error_message** | **str** | | - -## Example - -```python -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of DeploymentStatusResponse from a JSON string -deployment_status_response_instance = DeploymentStatusResponse.from_json(json) -# print the JSON string representation of the object -print DeploymentStatusResponse.to_json() - -# convert the object into a dict -deployment_status_response_dict = deployment_status_response_instance.to_dict() -# create an instance of DeploymentStatusResponse from a dict -deployment_status_response_form_dict = deployment_status_response.from_dict(deployment_status_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeploymentStatusResponseV2.md b/docs/DeploymentStatusResponseV2.md new file mode 100644 index 0000000..0304d74 --- /dev/null +++ b/docs/DeploymentStatusResponseV2.md @@ -0,0 +1,34 @@ +# DeploymentStatusResponseV2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**service_status** | [**HealthStatus**](HealthStatus.md) | | +**error_message** | **str** | | +**endpoint_url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentStatusResponseV2 from a JSON string +deployment_status_response_v2_instance = DeploymentStatusResponseV2.from_json(json) +# print the JSON string representation of the object +print(DeploymentStatusResponseV2.to_json()) + +# convert the object into a dict +deployment_status_response_v2_dict = deployment_status_response_v2_instance.to_dict() +# create an instance of DeploymentStatusResponseV2 from a dict +deployment_status_response_v2_from_dict = DeploymentStatusResponseV2.from_dict(deployment_status_response_v2_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/DeploymentUsageValue.md b/docs/DeploymentUsageValue.md new file mode 100644 index 0000000..4916f19 --- /dev/null +++ b/docs/DeploymentUsageValue.md @@ -0,0 +1,30 @@ +# DeploymentUsageValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | | +**value** | **float** | | + +## Example + +```python +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentUsageValue from a JSON string +deployment_usage_value_instance = DeploymentUsageValue.from_json(json) +# print the JSON string representation of the object +print(DeploymentUsageValue.to_json()) + +# convert the object into a dict +deployment_usage_value_dict = deployment_usage_value_instance.to_dict() +# create an instance of DeploymentUsageValue from a dict +deployment_usage_value_from_dict = DeploymentUsageValue.from_dict(deployment_usage_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index ad7adda..ed85de4 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -1,29 +1,195 @@ -# platform_api_client.EXTERNALApi +# platform_api_python_client.EXTERNALApi All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_compute_deployment_deployments_compute_post**](EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment -[**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +[**add_feedback_request_support_feedback_post**](EXTERNALApi.md#add_feedback_request_support_feedback_post) | **POST** /support/feedback | Add Feedback Request +[**create_api_key_credentials_api_key_post**](EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key +[**create_compute_deployment_deployments_v2_compute_post**](EXTERNALApi.md#create_compute_deployment_deployments_v2_compute_post) | **POST** /deployments/v2/compute | Create Compute Deployment +[**create_cserve_deployment_deployments_v2_cserve_post**](EXTERNALApi.md#create_cserve_deployment_deployments_v2_cserve_post) | **POST** /deployments/v2/cserve | Create Cserve Deployment +[**create_hardware_request_support_hardware_request_post**](EXTERNALApi.md#create_hardware_request_support_hardware_request_post) | **POST** /support/hardware-request | Create Hardware Request +[**create_inference_deployment_deployments_v2_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_v2_inference_post) | **POST** /deployments/v2/inference | Create Inference Deployment [**create_payment_payments_post**](EXTERNALApi.md#create_payment_payments_post) | **POST** /payments | Create Payment [**create_payment_setup_payments_setup_post**](EXTERNALApi.md#create_payment_setup_payments_setup_post) | **POST** /payments/setup | Create Payment Setup -[**create_training_deployment_deployments_training_post**](EXTERNALApi.md#create_training_deployment_deployments_training_post) | **POST** /deployments/training | Create Training Deployment +[**delete_api_key_credentials_api_key_id_delete**](EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key [**delete_payment_method_payments_methods_payment_method_delete**](EXTERNALApi.md#delete_payment_method_payments_methods_payment_method_delete) | **DELETE** /payments/methods/{payment_method} | Delete Payment Method -[**get_compute_deployment_deployments_compute_deployment_id_get**](EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment +[**get_api_keys_credentials_api_key_get**](EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys +[**get_clusters_clusters_get**](EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters +[**get_compute_deployment_deployments_v2_compute_deployment_id_get**](EXTERNALApi.md#get_compute_deployment_deployments_v2_compute_deployment_id_get) | **GET** /deployments/v2/compute/{deployment_id} | Get Compute Deployment [**get_credits_credits_get**](EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits -[**get_deployment_status_deployments_status_deployment_id_get**](EXTERNALApi.md#get_deployment_status_deployments_status_deployment_id_get) | **GET** /deployments/status/{deployment_id} | Get Deployment Status -[**get_deployments_deployments_get**](EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments +[**get_cserve_deployment_deployments_v2_cserve_deployment_id_get**](EXTERNALApi.md#get_cserve_deployment_deployments_v2_cserve_deployment_id_get) | **GET** /deployments/v2/cserve/{deployment_id} | Get Cserve Deployment +[**get_cserve_recipe_deployments_v2_cserve_recipes_get**](EXTERNALApi.md#get_cserve_recipe_deployments_v2_cserve_recipes_get) | **GET** /deployments/v2/cserve/recipes | Get Cserve Recipe +[**get_deployment_logs_deployments_logs_deployment_id_get**](EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs +[**get_deployment_status_deployments_v2_status_deployment_id_get**](EXTERNALApi.md#get_deployment_status_deployments_v2_status_deployment_id_get) | **GET** /deployments/v2/status/{deployment_id} | Get Deployment Status +[**get_deployments_deployments_v2_get**](EXTERNALApi.md#get_deployments_deployments_v2_get) | **GET** /deployments/v2 | Get Deployments [**get_hardware_instances_hardware_instances_get**](EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances -[**get_inference_deployment_deployments_inference_deployment_id_get**](EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment +[**get_hardware_instances_hardware_instances_v2_get**](EXTERNALApi.md#get_hardware_instances_hardware_instances_v2_get) | **GET** /hardware-instances/v2 | Get Hardware Instances +[**get_inference_deployment_deployments_v2_inference_deployment_id_get**](EXTERNALApi.md#get_inference_deployment_deployments_v2_inference_deployment_id_get) | **GET** /deployments/v2/inference/{deployment_id} | Get Inference Deployment [**get_payment_methods_payments_methods_get**](EXTERNALApi.md#get_payment_methods_payments_methods_get) | **GET** /payments/methods | Get Payment Methods [**get_prebuilt_images_prebuilt_images_get**](EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images -[**get_training_deployment_deployments_training_deployment_id_get**](EXTERNALApi.md#get_training_deployment_deployments_training_deployment_id_get) | **GET** /deployments/training/{deployment_id} | Get Training Deployment -[**update_deployment_status_deployments_status_deployment_id_put**](EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status +[**get_usage_daily_bills_get**](EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage +[**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage +[**update_deployment_status_deployments_v2_status_deployment_id_put**](EXTERNALApi.md#update_deployment_status_deployments_v2_status_deployment_id_put) | **PUT** /deployments/v2/status/{deployment_id} | Update Deployment Status -# **create_compute_deployment_deployments_compute_post** -> CreateComputeDeploymentResponse create_compute_deployment_deployments_compute_post(create_compute_deployment_request) +# **add_feedback_request_support_feedback_post** +> object add_feedback_request_support_feedback_post(feedback_request) + +Add Feedback Request + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.feedback_request import FeedbackRequest +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) + feedback_request = platform_api_python_client.FeedbackRequest() # FeedbackRequest | + + try: + # Add Feedback Request + api_response = api_instance.add_feedback_request_support_feedback_post(feedback_request) + print("The response of EXTERNALApi->add_feedback_request_support_feedback_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->add_feedback_request_support_feedback_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_request** | [**FeedbackRequest**](FeedbackRequest.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_api_key_credentials_api_key_post** +> APIKeyResponse create_api_key_credentials_api_key_post(api_key_request) + +Create Api Key + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + api_key_request = platform_api_python_client.APIKeyRequest() # APIKeyRequest | + + try: + # Create Api Key + api_response = api_instance.create_api_key_credentials_api_key_post(api_key_request) + print("The response of EXTERNALApi->create_api_key_credentials_api_key_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_api_key_credentials_api_key_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_key_request** | [**APIKeyRequest**](APIKeyRequest.md)| | + +### Return type + +[**APIKeyResponse**](APIKeyResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_compute_deployment_deployments_v2_compute_post** +> CreateComputeDeploymentResponse create_compute_deployment_deployments_v2_compute_post(create_compute_deployment_v2_request) Create Compute Deployment @@ -32,15 +198,550 @@ Create Compute Deployment * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_compute_deployment_v2_request = platform_api_python_client.CreateComputeDeploymentV2Request() # CreateComputeDeploymentV2Request | + + try: + # Create Compute Deployment + api_response = api_instance.create_compute_deployment_deployments_v2_compute_post(create_compute_deployment_v2_request) + print("The response of EXTERNALApi->create_compute_deployment_deployments_v2_compute_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_compute_deployment_deployments_v2_compute_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_compute_deployment_v2_request** | [**CreateComputeDeploymentV2Request**](CreateComputeDeploymentV2Request.md)| | + +### Return type + +[**CreateComputeDeploymentResponse**](CreateComputeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_cserve_deployment_deployments_v2_cserve_post** +> CreateCServeDeploymentResponse create_cserve_deployment_deployments_v2_cserve_post(create_c_serve_deployment_request) + +Create Cserve Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_c_serve_deployment_request = platform_api_python_client.CreateCServeDeploymentRequest() # CreateCServeDeploymentRequest | + + try: + # Create Cserve Deployment + api_response = api_instance.create_cserve_deployment_deployments_v2_cserve_post(create_c_serve_deployment_request) + print("The response of EXTERNALApi->create_cserve_deployment_deployments_v2_cserve_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_cserve_deployment_deployments_v2_cserve_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_c_serve_deployment_request** | [**CreateCServeDeploymentRequest**](CreateCServeDeploymentRequest.md)| | + +### Return type + +[**CreateCServeDeploymentResponse**](CreateCServeDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_hardware_request_support_hardware_request_post** +> object create_hardware_request_support_hardware_request_post(add_hardware_request) + +Create Hardware Request + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest +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) + add_hardware_request = platform_api_python_client.AddHardwareRequest() # AddHardwareRequest | + + try: + # Create Hardware Request + api_response = api_instance.create_hardware_request_support_hardware_request_post(add_hardware_request) + print("The response of EXTERNALApi->create_hardware_request_support_hardware_request_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_hardware_request_support_hardware_request_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **add_hardware_request** | [**AddHardwareRequest**](AddHardwareRequest.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_inference_deployment_deployments_v2_inference_post** +> CreateInferenceDeploymentResponse create_inference_deployment_deployments_v2_inference_post(create_inference_deployment_v2_request) + +Create Inference Deployment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_inference_deployment_v2_request = platform_api_python_client.CreateInferenceDeploymentV2Request() # CreateInferenceDeploymentV2Request | + + try: + # Create Inference Deployment + api_response = api_instance.create_inference_deployment_deployments_v2_inference_post(create_inference_deployment_v2_request) + print("The response of EXTERNALApi->create_inference_deployment_deployments_v2_inference_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_inference_deployment_deployments_v2_inference_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_inference_deployment_v2_request** | [**CreateInferenceDeploymentV2Request**](CreateInferenceDeploymentV2Request.md)| | + +### Return type + +[**CreateInferenceDeploymentResponse**](CreateInferenceDeploymentResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_payment_payments_post** +> ClientSecretResponse create_payment_payments_post(create_payment_request) + +Create Payment + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest +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_payment_request = platform_api_python_client.CreatePaymentRequest() # CreatePaymentRequest | + + try: + # Create Payment + api_response = api_instance.create_payment_payments_post(create_payment_request) + print("The response of EXTERNALApi->create_payment_payments_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_payment_payments_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_payment_request** | [**CreatePaymentRequest**](CreatePaymentRequest.md)| | + +### Return type + +[**ClientSecretResponse**](ClientSecretResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_payment_setup_payments_setup_post** +> ClientSecretResponse create_payment_setup_payments_setup_post() + +Create Payment Setup + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.client_secret_response import ClientSecretResponse +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: + # Create Payment Setup + api_response = api_instance.create_payment_setup_payments_setup_post() + print("The response of EXTERNALApi->create_payment_setup_payments_setup_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_payment_setup_payments_setup_post: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ClientSecretResponse**](ClientSecretResponse.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) + +# **delete_api_key_credentials_api_key_id_delete** +> object delete_api_key_credentials_api_key_id_delete(id) + +Delete Api Key + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + id = 'id_example' # str | + + try: + # Delete Api Key + api_response = api_instance.delete_api_key_credentials_api_key_id_delete(id) + print("The response of EXTERNALApi->delete_api_key_credentials_api_key_id_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->delete_api_key_credentials_api_key_id_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_payment_method_payments_methods_payment_method_delete** +> object delete_payment_method_payments_methods_payment_method_delete(payment_method) + +Delete Payment Method + +### 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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -50,23 +751,23 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - create_compute_deployment_request = platform_api_client.CreateComputeDeploymentRequest() # CreateComputeDeploymentRequest | + api_instance = platform_api_python_client.EXTERNALApi(api_client) + payment_method = 'payment_method_example' # str | try: - # Create Compute Deployment - api_response = api_instance.create_compute_deployment_deployments_compute_post(create_compute_deployment_request) - print("The response of EXTERNALApi->create_compute_deployment_deployments_compute_post:\n") + # Delete Payment Method + api_response = api_instance.delete_payment_method_payments_methods_payment_method_delete(payment_method) + print("The response of EXTERNALApi->delete_payment_method_payments_methods_payment_method_delete:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->create_compute_deployment_deployments_compute_post: %s\n" % e) + print("Exception when calling EXTERNALApi->delete_payment_method_payments_methods_payment_method_delete: %s\n" % e) ``` @@ -76,11 +777,11 @@ with platform_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_compute_deployment_request** | [**CreateComputeDeploymentRequest**](CreateComputeDeploymentRequest.md)| | + **payment_method** | **str**| | ### Return type -[**CreateComputeDeploymentResponse**](CreateComputeDeploymentResponse.md) +**object** ### Authorization @@ -88,7 +789,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -100,25 +801,24 @@ 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_inference_deployment_deployments_inference_post** -> CreateInferenceDeploymentResponse create_inference_deployment_deployments_inference_post(create_inference_deployment_request) +# **get_api_keys_credentials_api_key_get** +> ListAPIKeyResponse get_api_keys_credentials_api_key_get() -Create Inference Deployment +Get Api Keys ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -128,37 +828,33 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - create_inference_deployment_request = platform_api_client.CreateInferenceDeploymentRequest() # CreateInferenceDeploymentRequest | + api_instance = platform_api_python_client.EXTERNALApi(api_client) try: - # Create Inference Deployment - api_response = api_instance.create_inference_deployment_deployments_inference_post(create_inference_deployment_request) - print("The response of EXTERNALApi->create_inference_deployment_deployments_inference_post:\n") + # Get Api Keys + api_response = api_instance.get_api_keys_credentials_api_key_get() + print("The response of EXTERNALApi->get_api_keys_credentials_api_key_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->create_inference_deployment_deployments_inference_post: %s\n" % e) + print("Exception when calling EXTERNALApi->get_api_keys_credentials_api_key_get: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_inference_deployment_request** | [**CreateInferenceDeploymentRequest**](CreateInferenceDeploymentRequest.md)| | +This endpoint does not need any parameter. ### Return type -[**CreateInferenceDeploymentResponse**](CreateInferenceDeploymentResponse.md) +[**ListAPIKeyResponse**](ListAPIKeyResponse.md) ### Authorization @@ -166,7 +862,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -174,29 +870,27 @@ 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) -# **create_payment_payments_post** -> ClientSecretResponse create_payment_payments_post(create_payment_request) +# **get_clusters_clusters_get** +> ListGetClusterResponse get_clusters_clusters_get() -Create Payment +Get Clusters ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.client_secret_response import ClientSecretResponse -from platform_api_client.models.create_payment_request import CreatePaymentRequest -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -206,37 +900,33 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - create_payment_request = platform_api_client.CreatePaymentRequest() # CreatePaymentRequest | + api_instance = platform_api_python_client.EXTERNALApi(api_client) try: - # Create Payment - api_response = api_instance.create_payment_payments_post(create_payment_request) - print("The response of EXTERNALApi->create_payment_payments_post:\n") + # Get Clusters + api_response = api_instance.get_clusters_clusters_get() + print("The response of EXTERNALApi->get_clusters_clusters_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->create_payment_payments_post: %s\n" % e) + print("Exception when calling EXTERNALApi->get_clusters_clusters_get: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_payment_request** | [**CreatePaymentRequest**](CreatePaymentRequest.md)| | +This endpoint does not need any parameter. ### Return type -[**ClientSecretResponse**](ClientSecretResponse.md) +[**ListGetClusterResponse**](ListGetClusterResponse.md) ### Authorization @@ -244,7 +934,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -252,28 +942,27 @@ 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) -# **create_payment_setup_payments_setup_post** -> ClientSecretResponse create_payment_setup_payments_setup_post() +# **get_compute_deployment_deployments_v2_compute_deployment_id_get** +> GetComputeV2DeploymentResponse get_compute_deployment_deployments_v2_compute_deployment_id_get(deployment_id) -Create Payment Setup +Get Compute Deployment ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.client_secret_response import ClientSecretResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -283,33 +972,37 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | try: - # Create Payment Setup - api_response = api_instance.create_payment_setup_payments_setup_post() - print("The response of EXTERNALApi->create_payment_setup_payments_setup_post:\n") + # Get Compute Deployment + api_response = api_instance.get_compute_deployment_deployments_v2_compute_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_compute_deployment_deployments_v2_compute_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->create_payment_setup_payments_setup_post: %s\n" % e) + print("Exception when calling EXTERNALApi->get_compute_deployment_deployments_v2_compute_deployment_id_get: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | ### Return type -[**ClientSecretResponse**](ClientSecretResponse.md) +[**GetComputeV2DeploymentResponse**](GetComputeV2DeploymentResponse.md) ### Authorization @@ -325,28 +1018,28 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_training_deployment_deployments_training_post** -> CreateTrainingDeploymentResponse create_training_deployment_deployments_training_post(create_training_deployment_request) +# **get_credits_credits_get** +> CreditsResponse get_credits_credits_get() -Create Training Deployment +Get Credits ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -356,37 +1049,33 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - create_training_deployment_request = platform_api_client.CreateTrainingDeploymentRequest() # CreateTrainingDeploymentRequest | + api_instance = platform_api_python_client.EXTERNALApi(api_client) try: - # Create Training Deployment - api_response = api_instance.create_training_deployment_deployments_training_post(create_training_deployment_request) - print("The response of EXTERNALApi->create_training_deployment_deployments_training_post:\n") + # Get Credits + api_response = api_instance.get_credits_credits_get() + print("The response of EXTERNALApi->get_credits_credits_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->create_training_deployment_deployments_training_post: %s\n" % e) + print("Exception when calling EXTERNALApi->get_credits_credits_get: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_training_deployment_request** | [**CreateTrainingDeploymentRequest**](CreateTrainingDeploymentRequest.md)| | +This endpoint does not need any parameter. ### Return type -[**CreateTrainingDeploymentResponse**](CreateTrainingDeploymentResponse.md) +[**CreditsResponse**](CreditsResponse.md) ### Authorization @@ -394,7 +1083,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -402,27 +1091,27 @@ 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) -# **delete_payment_method_payments_methods_payment_method_delete** -> object delete_payment_method_payments_methods_payment_method_delete(payment_method) +# **get_cserve_deployment_deployments_v2_cserve_deployment_id_get** +> GetCServeDeploymentResponse get_cserve_deployment_deployments_v2_cserve_deployment_id_get(deployment_id) -Delete Payment Method +Get Cserve Deployment ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -432,23 +1121,23 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - payment_method = 'payment_method_example' # str | + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | try: - # Delete Payment Method - api_response = api_instance.delete_payment_method_payments_methods_payment_method_delete(payment_method) - print("The response of EXTERNALApi->delete_payment_method_payments_methods_payment_method_delete:\n") + # Get Cserve Deployment + api_response = api_instance.get_cserve_deployment_deployments_v2_cserve_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_cserve_deployment_deployments_v2_cserve_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->delete_payment_method_payments_methods_payment_method_delete: %s\n" % e) + print("Exception when calling EXTERNALApi->get_cserve_deployment_deployments_v2_cserve_deployment_id_get: %s\n" % e) ``` @@ -458,11 +1147,11 @@ with platform_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **payment_method** | **str**| | + **deployment_id** | **int**| | ### Return type -**object** +[**GetCServeDeploymentResponse**](GetCServeDeploymentResponse.md) ### Authorization @@ -482,24 +1171,24 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_compute_deployment_deployments_compute_deployment_id_get** -> GetComputeDeploymentResponse get_compute_deployment_deployments_compute_deployment_id_get(deployment_id) +# **get_cserve_recipe_deployments_v2_cserve_recipes_get** +> ListCServeRecipeResponse get_cserve_recipe_deployments_v2_cserve_recipes_get(model=model, cluster_id=cluster_id) -Get Compute Deployment +Get Cserve Recipe ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.get_compute_deployment_response import GetComputeDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -509,23 +1198,24 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - deployment_id = 56 # int | + api_instance = platform_api_python_client.EXTERNALApi(api_client) + model = 'model_example' # str | (optional) + cluster_id = 56 # int | (optional) try: - # Get Compute Deployment - api_response = api_instance.get_compute_deployment_deployments_compute_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_compute_deployment_deployments_compute_deployment_id_get:\n") + # Get Cserve Recipe + api_response = api_instance.get_cserve_recipe_deployments_v2_cserve_recipes_get(model=model, cluster_id=cluster_id) + print("The response of EXTERNALApi->get_cserve_recipe_deployments_v2_cserve_recipes_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_compute_deployment_deployments_compute_deployment_id_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_cserve_recipe_deployments_v2_cserve_recipes_get: %s\n" % e) ``` @@ -535,11 +1225,12 @@ with platform_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **deployment_id** | **int**| | + **model** | **str**| | [optional] + **cluster_id** | **int**| | [optional] ### Return type -[**GetComputeDeploymentResponse**](GetComputeDeploymentResponse.md) +[**ListCServeRecipeResponse**](ListCServeRecipeResponse.md) ### Authorization @@ -559,24 +1250,24 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_credits_credits_get** -> CreditsResponse get_credits_credits_get() +# **get_deployment_logs_deployments_logs_deployment_id_get** +> GetDeploymentLogResponse get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) -Get Credits +Get Deployment Logs ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.credits_response import CreditsResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -586,33 +1277,43 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + start_time = 56 # int | + end_time = 56 # int | + next_page_token = 'next_page_token_example' # str | (optional) try: - # Get Credits - api_response = api_instance.get_credits_credits_get() - print("The response of EXTERNALApi->get_credits_credits_get:\n") + # Get Deployment Logs + api_response = api_instance.get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) + print("The response of EXTERNALApi->get_deployment_logs_deployments_logs_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_credits_credits_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_deployment_logs_deployments_logs_deployment_id_get: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + **start_time** | **int**| | + **end_time** | **int**| | + **next_page_token** | **str**| | [optional] ### Return type -[**CreditsResponse**](CreditsResponse.md) +[**GetDeploymentLogResponse**](GetDeploymentLogResponse.md) ### Authorization @@ -628,11 +1329,12 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_deployment_status_deployments_status_deployment_id_get** -> DeploymentStatusResponse get_deployment_status_deployments_status_deployment_id_get(deployment_id) +# **get_deployment_status_deployments_v2_status_deployment_id_get** +> DeploymentStatusResponseV2 get_deployment_status_deployments_v2_status_deployment_id_get(deployment_id) Get Deployment Status @@ -641,14 +1343,14 @@ Get Deployment Status * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -658,23 +1360,23 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | try: # Get Deployment Status - api_response = api_instance.get_deployment_status_deployments_status_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_deployment_status_deployments_status_deployment_id_get:\n") + api_response = api_instance.get_deployment_status_deployments_v2_status_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_deployment_status_deployments_v2_status_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_deployment_status_deployments_status_deployment_id_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_deployment_status_deployments_v2_status_deployment_id_get: %s\n" % e) ``` @@ -688,7 +1390,7 @@ Name | Type | Description | Notes ### Return type -[**DeploymentStatusResponse**](DeploymentStatusResponse.md) +[**DeploymentStatusResponseV2**](DeploymentStatusResponseV2.md) ### Authorization @@ -708,8 +1410,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_deployments_deployments_get** -> ListGetDeploymentResponse get_deployments_deployments_get(offset=offset, limit=limit, type=type, search_query=search_query) +# **get_deployments_deployments_v2_get** +> ListGetDeploymentV2Response get_deployments_deployments_v2_get(offset=offset, limit=limit, type=type, search_query=search_query) Get Deployments @@ -718,15 +1420,15 @@ Get Deployments * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -736,26 +1438,26 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) offset = 56 # int | (optional) limit = 56 # int | (optional) - type = platform_api_client.DeploymentType() # DeploymentType | (optional) + type = platform_api_python_client.DeploymentType() # DeploymentType | (optional) search_query = 'search_query_example' # str | (optional) try: # Get Deployments - api_response = api_instance.get_deployments_deployments_get(offset=offset, limit=limit, type=type, search_query=search_query) - print("The response of EXTERNALApi->get_deployments_deployments_get:\n") + api_response = api_instance.get_deployments_deployments_v2_get(offset=offset, limit=limit, type=type, search_query=search_query) + print("The response of EXTERNALApi->get_deployments_deployments_v2_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_deployments_deployments_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_deployments_deployments_v2_get: %s\n" % e) ``` @@ -772,7 +1474,7 @@ Name | Type | Description | Notes ### Return type -[**ListGetDeploymentResponse**](ListGetDeploymentResponse.md) +[**ListGetDeploymentV2Response**](ListGetDeploymentV2Response.md) ### Authorization @@ -799,24 +1501,34 @@ Get Hardware Instances ### Example +* Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) try: # Get Hardware Instances @@ -839,7 +1551,83 @@ This endpoint does not need any parameter. ### Authorization -No authorization required +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_hardware_instances_hardware_instances_v2_get** +> ListHardwareInstanceResponse get_hardware_instances_hardware_instances_v2_get(cluster_id) + +Get Hardware Instances + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + cluster_id = 56 # int | + + try: + # Get Hardware Instances + api_response = api_instance.get_hardware_instances_hardware_instances_v2_get(cluster_id) + print("The response of EXTERNALApi->get_hardware_instances_hardware_instances_v2_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_hardware_instances_hardware_instances_v2_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + +### Return type + +[**ListHardwareInstanceResponse**](ListHardwareInstanceResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) ### HTTP request headers @@ -851,11 +1639,12 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_inference_deployment_deployments_inference_deployment_id_get** -> GetInferenceDeploymentResponse get_inference_deployment_deployments_inference_deployment_id_get(deployment_id) +# **get_inference_deployment_deployments_v2_inference_deployment_id_get** +> GetInferenceV2DeploymentResponse get_inference_deployment_deployments_v2_inference_deployment_id_get(deployment_id) Get Inference Deployment @@ -864,14 +1653,14 @@ Get Inference Deployment * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -881,23 +1670,23 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | try: # Get Inference Deployment - api_response = api_instance.get_inference_deployment_deployments_inference_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_inference_deployment_deployments_inference_deployment_id_get:\n") + api_response = api_instance.get_inference_deployment_deployments_v2_inference_deployment_id_get(deployment_id) + print("The response of EXTERNALApi->get_inference_deployment_deployments_v2_inference_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_inference_deployment_deployments_inference_deployment_id_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_inference_deployment_deployments_v2_inference_deployment_id_get: %s\n" % e) ``` @@ -911,7 +1700,7 @@ Name | Type | Description | Notes ### Return type -[**GetInferenceDeploymentResponse**](GetInferenceDeploymentResponse.md) +[**GetInferenceV2DeploymentResponse**](GetInferenceV2DeploymentResponse.md) ### Authorization @@ -941,14 +1730,14 @@ Get Payment Methods * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -958,14 +1747,14 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) try: # Get Payment Methods @@ -1010,26 +1799,36 @@ Get Prebuilt Images ### Example +* Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) - type = platform_api_client.DeploymentType() # DeploymentType | (optional) + api_instance = platform_api_python_client.EXTERNALApi(api_client) + type = platform_api_python_client.DeploymentType() # DeploymentType | (optional) try: # Get Prebuilt Images @@ -1055,7 +1854,86 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_usage_daily_bills_get** +> ListDailyBillResponse get_usage_daily_bills_get(start_date, end_date) + +Get Usage + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + start_date = '2013-10-20' # date | + end_date = '2013-10-20' # date | + + try: + # Get Usage + api_response = api_instance.get_usage_daily_bills_get(start_date, end_date) + print("The response of EXTERNALApi->get_usage_daily_bills_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_usage_daily_bills_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **date**| | + **end_date** | **date**| | + +### Return type + +[**ListDailyBillResponse**](ListDailyBillResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) ### HTTP request headers @@ -1071,24 +1949,25 @@ 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) -# **get_training_deployment_deployments_training_deployment_id_get** -> GetTrainingDeploymentResponse get_training_deployment_deployments_training_deployment_id_get(deployment_id) +# **get_usage_deployments_usage_deployment_id_get** +> GetDeploymentUsageResponse get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) -Get Training Deployment +Get Usage ### Example * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -1098,23 +1977,26 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | + metric = platform_api_python_client.Metric() # Metric | + duration = 56 # int | + end_time = 56 # int | (optional) try: - # Get Training Deployment - api_response = api_instance.get_training_deployment_deployments_training_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_training_deployment_deployments_training_deployment_id_get:\n") + # Get Usage + api_response = api_instance.get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) + print("The response of EXTERNALApi->get_usage_deployments_usage_deployment_id_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_training_deployment_deployments_training_deployment_id_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_usage_deployments_usage_deployment_id_get: %s\n" % e) ``` @@ -1125,10 +2007,13 @@ with platform_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **deployment_id** | **int**| | + **metric** | [**Metric**](.md)| | + **duration** | **int**| | + **end_time** | **int**| | [optional] ### Return type -[**GetTrainingDeploymentResponse**](GetTrainingDeploymentResponse.md) +[**GetDeploymentUsageResponse**](GetDeploymentUsageResponse.md) ### Authorization @@ -1148,8 +2033,8 @@ 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_deployment_status_deployments_status_deployment_id_put** -> DeploymentStatusResponse update_deployment_status_deployments_status_deployment_id_put(deployment_id, deployment_status_request) +# **update_deployment_status_deployments_v2_status_deployment_id_put** +> DeploymentStatusResponseV2 update_deployment_status_deployments_v2_status_deployment_id_put(deployment_id, deployment_status_request) Update Deployment Status @@ -1158,15 +2043,15 @@ Update Deployment Status * Bearer Authentication (HTTPBearer): ```python -import platform_api_client -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse -from platform_api_client.rest import ApiException +import platform_api_python_client +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 +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_client.Configuration( +configuration = platform_api_python_client.Configuration( host = "http://localhost" ) @@ -1176,24 +2061,24 @@ configuration = platform_api_client.Configuration( # satisfies your auth use case. # Configure Bearer authorization: HTTPBearer -configuration = platform_api_client.Configuration( +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_client.ApiClient(configuration) as api_client: +with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = platform_api_client.EXTERNALApi(api_client) + api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | - deployment_status_request = platform_api_client.DeploymentStatusRequest() # DeploymentStatusRequest | + deployment_status_request = platform_api_python_client.DeploymentStatusRequest() # DeploymentStatusRequest | try: # Update Deployment Status - api_response = api_instance.update_deployment_status_deployments_status_deployment_id_put(deployment_id, deployment_status_request) - print("The response of EXTERNALApi->update_deployment_status_deployments_status_deployment_id_put:\n") + api_response = api_instance.update_deployment_status_deployments_v2_status_deployment_id_put(deployment_id, deployment_status_request) + print("The response of EXTERNALApi->update_deployment_status_deployments_v2_status_deployment_id_put:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->update_deployment_status_deployments_status_deployment_id_put: %s\n" % e) + print("Exception when calling EXTERNALApi->update_deployment_status_deployments_v2_status_deployment_id_put: %s\n" % e) ``` @@ -1208,7 +2093,7 @@ Name | Type | Description | Notes ### Return type -[**DeploymentStatusResponse**](DeploymentStatusResponse.md) +[**DeploymentStatusResponseV2**](DeploymentStatusResponseV2.md) ### Authorization diff --git a/docs/FeedbackRequest.md b/docs/FeedbackRequest.md new file mode 100644 index 0000000..54e3bee --- /dev/null +++ b/docs/FeedbackRequest.md @@ -0,0 +1,31 @@ +# FeedbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**rating** | **int** | | +**follow_up** | **bool** | | + +## Example + +```python +from platform_api_python_client.models.feedback_request import FeedbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackRequest from a JSON string +feedback_request_instance = FeedbackRequest.from_json(json) +# print the JSON string representation of the object +print(FeedbackRequest.to_json()) + +# convert the object into a dict +feedback_request_dict = feedback_request_instance.to_dict() +# create an instance of FeedbackRequest from a dict +feedback_request_from_dict = FeedbackRequest.from_dict(feedback_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/GetCServeDeploymentResponse.md b/docs/GetCServeDeploymentResponse.md new file mode 100644 index 0000000..7fae885 --- /dev/null +++ b/docs/GetCServeDeploymentResponse.md @@ -0,0 +1,61 @@ +# GetCServeDeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model** | **str** | | +**is_embedding_model** | **bool** | | [default to False] +**tensor_parallel_size** | **int** | | +**pipeline_parallel_size** | **int** | | +**block_size** | **int** | | [default to 32] +**swap_space** | **int** | | [default to 0] +**gpu_mem_util** | **float** | | [default to 0.95] +**max_num_seqs** | **int** | | [default to 256] +**use_prefix_caching** | **bool** | | +**offloading_num** | **int** | | [default to 0] +**use_flashinfer** | **bool** | | [default to False] +**max_model_len** | **int** | | +**dtype** | **str** | | [default to 'auto'] +**tokenizer** | **str** | | +**spec_proposer** | **str** | | +**spec_draft_model** | **str** | | +**spec_tokens** | **int** | | +**spec_prompt_lookup_min** | **int** | | +**spec_prompt_lookup_max** | **int** | | +**seed** | **int** | | [default to 0] +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**endpoint_certificate_authority** | **str** | | +**concurrency** | **int** | | + +## Example + +```python +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetCServeDeploymentResponse from a JSON string +get_c_serve_deployment_response_instance = GetCServeDeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetCServeDeploymentResponse.to_json()) + +# convert the object into a dict +get_c_serve_deployment_response_dict = get_c_serve_deployment_response_instance.to_dict() +# create an instance of GetCServeDeploymentResponse from a dict +get_c_serve_deployment_response_from_dict = GetCServeDeploymentResponse.from_dict(get_c_serve_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetClusterResponse.md b/docs/GetClusterResponse.md new file mode 100644 index 0000000..dfe90e9 --- /dev/null +++ b/docs/GetClusterResponse.md @@ -0,0 +1,30 @@ +# GetClusterResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**display_name** | **str** | | + +## Example + +```python +from platform_api_python_client.models.get_cluster_response import GetClusterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetClusterResponse from a JSON string +get_cluster_response_instance = GetClusterResponse.from_json(json) +# print the JSON string representation of the object +print(GetClusterResponse.to_json()) + +# convert the object into a dict +get_cluster_response_dict = get_cluster_response_instance.to_dict() +# create an instance of GetClusterResponse from a dict +get_cluster_response_from_dict = GetClusterResponse.from_dict(get_cluster_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetComputeDeploymentResponse.md b/docs/GetComputeV2DeploymentResponse.md similarity index 50% rename from docs/GetComputeDeploymentResponse.md rename to docs/GetComputeV2DeploymentResponse.md index 6db41f8..2fc45b5 100644 --- a/docs/GetComputeDeploymentResponse.md +++ b/docs/GetComputeV2DeploymentResponse.md @@ -1,41 +1,40 @@ -# GetComputeDeploymentResponse +# GetComputeV2DeploymentResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | **id** | **int** | | **name** | **str** | | +**endpoint_url** | **str** | | **image_url** | **str** | | **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | **hardware_instance_id** | **int** | | -**endpoint_url** | **str** | | +**exposed_port** | **int** | | +**ssh_public_key** | **str** | | +**ssh_password** | **str** | | **env_vars** | **Dict[str, str]** | | -**secrets** | [**AuthSecret**](AuthSecret.md) | | -**port** | **int** | | -**ssh_key** | **str** | | -**username** | **str** | | -**password** | **str** | | ## Example ```python -from platform_api_client.models.get_compute_deployment_response import GetComputeDeploymentResponse +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse # TODO update the JSON string below json = "{}" -# create an instance of GetComputeDeploymentResponse from a JSON string -get_compute_deployment_response_instance = GetComputeDeploymentResponse.from_json(json) +# create an instance of GetComputeV2DeploymentResponse from a JSON string +get_compute_v2_deployment_response_instance = GetComputeV2DeploymentResponse.from_json(json) # print the JSON string representation of the object -print GetComputeDeploymentResponse.to_json() +print(GetComputeV2DeploymentResponse.to_json()) # convert the object into a dict -get_compute_deployment_response_dict = get_compute_deployment_response_instance.to_dict() -# create an instance of GetComputeDeploymentResponse from a dict -get_compute_deployment_response_form_dict = get_compute_deployment_response.from_dict(get_compute_deployment_response_dict) +get_compute_v2_deployment_response_dict = get_compute_v2_deployment_response_instance.to_dict() +# create an instance of GetComputeV2DeploymentResponse from a dict +get_compute_v2_deployment_response_from_dict = GetComputeV2DeploymentResponse.from_dict(get_compute_v2_deployment_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetDeploymentLogResponse.md b/docs/GetDeploymentLogResponse.md new file mode 100644 index 0000000..a75aa7d --- /dev/null +++ b/docs/GetDeploymentLogResponse.md @@ -0,0 +1,30 @@ +# GetDeploymentLogResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | **List[object]** | | +**next_page_token** | **str** | | + +## Example + +```python +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeploymentLogResponse from a JSON string +get_deployment_log_response_instance = GetDeploymentLogResponse.from_json(json) +# print the JSON string representation of the object +print(GetDeploymentLogResponse.to_json()) + +# convert the object into a dict +get_deployment_log_response_dict = get_deployment_log_response_instance.to_dict() +# create an instance of GetDeploymentLogResponse from a dict +get_deployment_log_response_from_dict = GetDeploymentLogResponse.from_dict(get_deployment_log_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetDeploymentUsageResponse.md b/docs/GetDeploymentUsageResponse.md new file mode 100644 index 0000000..99330d3 --- /dev/null +++ b/docs/GetDeploymentUsageResponse.md @@ -0,0 +1,29 @@ +# GetDeploymentUsageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**List[DeploymentUsageValue]**](DeploymentUsageValue.md) | | + +## Example + +```python +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeploymentUsageResponse from a JSON string +get_deployment_usage_response_instance = GetDeploymentUsageResponse.from_json(json) +# print the JSON string representation of the object +print(GetDeploymentUsageResponse.to_json()) + +# convert the object into a dict +get_deployment_usage_response_dict = get_deployment_usage_response_instance.to_dict() +# create an instance of GetDeploymentUsageResponse from a dict +get_deployment_usage_response_from_dict = GetDeploymentUsageResponse.from_dict(get_deployment_usage_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetDeploymentResponse.md b/docs/GetDeploymentV2Response.md similarity index 53% rename from docs/GetDeploymentResponse.md rename to docs/GetDeploymentV2Response.md index 721277e..16b819d 100644 --- a/docs/GetDeploymentResponse.md +++ b/docs/GetDeploymentV2Response.md @@ -1,12 +1,14 @@ -# GetDeploymentResponse +# GetDeploymentV2Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | **id** | **int** | | **name** | **str** | | +**endpoint_url** | **str** | | **image_url** | **str** | | **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | @@ -16,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.get_deployment_response import GetDeploymentResponse +from platform_api_python_client.models.get_deployment_v2_response import GetDeploymentV2Response # TODO update the JSON string below json = "{}" -# create an instance of GetDeploymentResponse from a JSON string -get_deployment_response_instance = GetDeploymentResponse.from_json(json) +# create an instance of GetDeploymentV2Response from a JSON string +get_deployment_v2_response_instance = GetDeploymentV2Response.from_json(json) # print the JSON string representation of the object -print GetDeploymentResponse.to_json() +print(GetDeploymentV2Response.to_json()) # convert the object into a dict -get_deployment_response_dict = get_deployment_response_instance.to_dict() -# create an instance of GetDeploymentResponse from a dict -get_deployment_response_form_dict = get_deployment_response.from_dict(get_deployment_response_dict) +get_deployment_v2_response_dict = get_deployment_v2_response_instance.to_dict() +# create an instance of GetDeploymentV2Response from a dict +get_deployment_v2_response_from_dict = GetDeploymentV2Response.from_dict(get_deployment_v2_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/GetInferenceDeploymentResponse.md b/docs/GetInferenceDeploymentResponse.md deleted file mode 100644 index f0a5084..0000000 --- a/docs/GetInferenceDeploymentResponse.md +++ /dev/null @@ -1,43 +0,0 @@ -# GetInferenceDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**image_url** | **str** | | -**type** | [**DeploymentType**](DeploymentType.md) | | -**status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**created_at** | **datetime** | | -**hardware_instance_id** | **int** | | -**endpoint_url** | **str** | | -**env_vars** | **Dict[str, str]** | | -**secrets** | [**AuthSecret**](AuthSecret.md) | | -**port** | **int** | | -**min_replicas** | **int** | | -**max_replicas** | **int** | | -**timeout** | **int** | | -**healthcheck** | **str** | | - -## Example - -```python -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetInferenceDeploymentResponse from a JSON string -get_inference_deployment_response_instance = GetInferenceDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print GetInferenceDeploymentResponse.to_json() - -# convert the object into a dict -get_inference_deployment_response_dict = get_inference_deployment_response_instance.to_dict() -# create an instance of GetInferenceDeploymentResponse from a dict -get_inference_deployment_response_form_dict = get_inference_deployment_response.from_dict(get_inference_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetInferenceV2DeploymentResponse.md b/docs/GetInferenceV2DeploymentResponse.md new file mode 100644 index 0000000..d2c47c9 --- /dev/null +++ b/docs/GetInferenceV2DeploymentResponse.md @@ -0,0 +1,44 @@ +# GetInferenceV2DeploymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_id** | **int** | | +**id** | **int** | | +**name** | **str** | | +**endpoint_url** | **str** | | +**image_url** | **str** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | +**created_at** | **datetime** | | +**hardware_instance_id** | **int** | | +**container_port** | **int** | | +**min_scale** | **int** | | +**max_scale** | **int** | | +**concurrency** | **int** | | +**healthcheck** | **str** | | +**endpoint_certificate_authority** | **str** | | +**env_vars** | **Dict[str, str]** | | + +## Example + +```python +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInferenceV2DeploymentResponse from a JSON string +get_inference_v2_deployment_response_instance = GetInferenceV2DeploymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetInferenceV2DeploymentResponse.to_json()) + +# convert the object into a dict +get_inference_v2_deployment_response_dict = get_inference_v2_deployment_response_instance.to_dict() +# create an instance of GetInferenceV2DeploymentResponse from a dict +get_inference_v2_deployment_response_from_dict = GetInferenceV2DeploymentResponse.from_dict(get_inference_v2_deployment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetTrainingDeploymentResponse.md b/docs/GetTrainingDeploymentResponse.md deleted file mode 100644 index 6f3cba7..0000000 --- a/docs/GetTrainingDeploymentResponse.md +++ /dev/null @@ -1,38 +0,0 @@ -# GetTrainingDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**image_url** | **str** | | -**type** | [**DeploymentType**](DeploymentType.md) | | -**status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**created_at** | **datetime** | | -**hardware_instance_id** | **int** | | -**endpoint_url** | **str** | | -**env_vars** | **Dict[str, str]** | | -**secrets** | [**AuthSecret**](AuthSecret.md) | | - -## Example - -```python -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTrainingDeploymentResponse from a JSON string -get_training_deployment_response_instance = GetTrainingDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print GetTrainingDeploymentResponse.to_json() - -# convert the object into a dict -get_training_deployment_response_dict = get_training_deployment_response_instance.to_dict() -# create an instance of GetTrainingDeploymentResponse from a dict -get_training_deployment_response_form_dict = get_training_deployment_response.from_dict(get_training_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md index b7eb735..bbb693a 100644 --- a/docs/HTTPValidationError.md +++ b/docs/HTTPValidationError.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.http_validation_error import HTTPValidationError # TODO update the JSON string below json = "{}" # create an instance of HTTPValidationError from a JSON string http_validation_error_instance = HTTPValidationError.from_json(json) # print the JSON string representation of the object -print HTTPValidationError.to_json() +print(HTTPValidationError.to_json()) # convert the object into a dict http_validation_error_dict = http_validation_error_instance.to_dict() # create an instance of HTTPValidationError from a dict -http_validation_error_form_dict = http_validation_error.from_dict(http_validation_error_dict) +http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HardwareInstanceResponse.md b/docs/HardwareInstanceResponse.md index 9af105d..8da7205 100644 --- a/docs/HardwareInstanceResponse.md +++ b/docs/HardwareInstanceResponse.md @@ -11,24 +11,24 @@ Name | Type | Description | Notes **num_gpu** | **int** | | **cpu** | **int** | | **memory** | **int** | | -**cost** | **int** | | +**cost_per_hr** | **int** | | ## Example ```python -from platform_api_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse # TODO update the JSON string below json = "{}" # create an instance of HardwareInstanceResponse from a JSON string hardware_instance_response_instance = HardwareInstanceResponse.from_json(json) # print the JSON string representation of the object -print HardwareInstanceResponse.to_json() +print(HardwareInstanceResponse.to_json()) # convert the object into a dict hardware_instance_response_dict = hardware_instance_response_instance.to_dict() # create an instance of HardwareInstanceResponse from a dict -hardware_instance_response_form_dict = hardware_instance_response.from_dict(hardware_instance_response_dict) +hardware_instance_response_from_dict = HardwareInstanceResponse.from_dict(hardware_instance_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EndpointReadyState.md b/docs/HealthStatus.md similarity index 81% rename from docs/EndpointReadyState.md rename to docs/HealthStatus.md index 3b7baf8..55f1ea9 100644 --- a/docs/EndpointReadyState.md +++ b/docs/HealthStatus.md @@ -1,6 +1,5 @@ -# EndpointReadyState +# HealthStatus -Enum for the ready state of an endpoint. ## Properties diff --git a/docs/ListAPIKeyResponse.md b/docs/ListAPIKeyResponse.md new file mode 100644 index 0000000..46ebe91 --- /dev/null +++ b/docs/ListAPIKeyResponse.md @@ -0,0 +1,29 @@ +# ListAPIKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[APIKeyResponse]**](APIKeyResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListAPIKeyResponse from a JSON string +list_api_key_response_instance = ListAPIKeyResponse.from_json(json) +# print the JSON string representation of the object +print(ListAPIKeyResponse.to_json()) + +# convert the object into a dict +list_api_key_response_dict = list_api_key_response_instance.to_dict() +# create an instance of ListAPIKeyResponse from a dict +list_api_key_response_from_dict = ListAPIKeyResponse.from_dict(list_api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListCServeRecipeResponse.md b/docs/ListCServeRecipeResponse.md new file mode 100644 index 0000000..aaf6e01 --- /dev/null +++ b/docs/ListCServeRecipeResponse.md @@ -0,0 +1,29 @@ +# ListCServeRecipeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[CServeRecipeResponse]**](CServeRecipeResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListCServeRecipeResponse from a JSON string +list_c_serve_recipe_response_instance = ListCServeRecipeResponse.from_json(json) +# print the JSON string representation of the object +print(ListCServeRecipeResponse.to_json()) + +# convert the object into a dict +list_c_serve_recipe_response_dict = list_c_serve_recipe_response_instance.to_dict() +# create an instance of ListCServeRecipeResponse from a dict +list_c_serve_recipe_response_from_dict = ListCServeRecipeResponse.from_dict(list_c_serve_recipe_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDailyBillResponse.md b/docs/ListDailyBillResponse.md new file mode 100644 index 0000000..4f8d485 --- /dev/null +++ b/docs/ListDailyBillResponse.md @@ -0,0 +1,29 @@ +# ListDailyBillResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[DailyBillResponse]**](DailyBillResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDailyBillResponse from a JSON string +list_daily_bill_response_instance = ListDailyBillResponse.from_json(json) +# print the JSON string representation of the object +print(ListDailyBillResponse.to_json()) + +# convert the object into a dict +list_daily_bill_response_dict = list_daily_bill_response_instance.to_dict() +# create an instance of ListDailyBillResponse from a dict +list_daily_bill_response_from_dict = ListDailyBillResponse.from_dict(list_daily_bill_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListGetClusterResponse.md b/docs/ListGetClusterResponse.md new file mode 100644 index 0000000..08e50d4 --- /dev/null +++ b/docs/ListGetClusterResponse.md @@ -0,0 +1,29 @@ +# ListGetClusterResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[GetClusterResponse]**](GetClusterResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGetClusterResponse from a JSON string +list_get_cluster_response_instance = ListGetClusterResponse.from_json(json) +# print the JSON string representation of the object +print(ListGetClusterResponse.to_json()) + +# convert the object into a dict +list_get_cluster_response_dict = list_get_cluster_response_instance.to_dict() +# create an instance of ListGetClusterResponse from a dict +list_get_cluster_response_from_dict = ListGetClusterResponse.from_dict(list_get_cluster_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListGetDeploymentResponse.md b/docs/ListGetDeploymentResponse.md deleted file mode 100644 index bf323f2..0000000 --- a/docs/ListGetDeploymentResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListGetDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[GetDeploymentResponse]**](GetDeploymentResponse.md) | | - -## Example - -```python -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ListGetDeploymentResponse from a JSON string -list_get_deployment_response_instance = ListGetDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print ListGetDeploymentResponse.to_json() - -# convert the object into a dict -list_get_deployment_response_dict = list_get_deployment_response_instance.to_dict() -# create an instance of ListGetDeploymentResponse from a dict -list_get_deployment_response_form_dict = list_get_deployment_response.from_dict(list_get_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ListGetDeploymentV2Response.md b/docs/ListGetDeploymentV2Response.md new file mode 100644 index 0000000..3b8f5cb --- /dev/null +++ b/docs/ListGetDeploymentV2Response.md @@ -0,0 +1,29 @@ +# ListGetDeploymentV2Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[GetDeploymentV2Response]**](GetDeploymentV2Response.md) | | + +## Example + +```python +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGetDeploymentV2Response from a JSON string +list_get_deployment_v2_response_instance = ListGetDeploymentV2Response.from_json(json) +# print the JSON string representation of the object +print(ListGetDeploymentV2Response.to_json()) + +# convert the object into a dict +list_get_deployment_v2_response_dict = list_get_deployment_v2_response_instance.to_dict() +# create an instance of ListGetDeploymentV2Response from a dict +list_get_deployment_v2_response_from_dict = ListGetDeploymentV2Response.from_dict(list_get_deployment_v2_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/ListHardwareInstanceResponse.md b/docs/ListHardwareInstanceResponse.md index 153bb8b..5674076 100644 --- a/docs/ListHardwareInstanceResponse.md +++ b/docs/ListHardwareInstanceResponse.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse # TODO update the JSON string below json = "{}" # create an instance of ListHardwareInstanceResponse from a JSON string list_hardware_instance_response_instance = ListHardwareInstanceResponse.from_json(json) # print the JSON string representation of the object -print ListHardwareInstanceResponse.to_json() +print(ListHardwareInstanceResponse.to_json()) # convert the object into a dict list_hardware_instance_response_dict = list_hardware_instance_response_instance.to_dict() # create an instance of ListHardwareInstanceResponse from a dict -list_hardware_instance_response_form_dict = list_hardware_instance_response.from_dict(list_hardware_instance_response_dict) +list_hardware_instance_response_from_dict = ListHardwareInstanceResponse.from_dict(list_hardware_instance_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListPaymentMethodResponse.md b/docs/ListPaymentMethodResponse.md index 620e108..431d166 100644 --- a/docs/ListPaymentMethodResponse.md +++ b/docs/ListPaymentMethodResponse.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse # TODO update the JSON string below json = "{}" # create an instance of ListPaymentMethodResponse from a JSON string list_payment_method_response_instance = ListPaymentMethodResponse.from_json(json) # print the JSON string representation of the object -print ListPaymentMethodResponse.to_json() +print(ListPaymentMethodResponse.to_json()) # convert the object into a dict list_payment_method_response_dict = list_payment_method_response_instance.to_dict() # create an instance of ListPaymentMethodResponse from a dict -list_payment_method_response_form_dict = list_payment_method_response.from_dict(list_payment_method_response_dict) +list_payment_method_response_from_dict = ListPaymentMethodResponse.from_dict(list_payment_method_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/ListPrebuiltImageResponse.md b/docs/ListPrebuiltImageResponse.md index b5f32c7..e8f851f 100644 --- a/docs/ListPrebuiltImageResponse.md +++ b/docs/ListPrebuiltImageResponse.md @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse # TODO update the JSON string below json = "{}" # create an instance of ListPrebuiltImageResponse from a JSON string list_prebuilt_image_response_instance = ListPrebuiltImageResponse.from_json(json) # print the JSON string representation of the object -print ListPrebuiltImageResponse.to_json() +print(ListPrebuiltImageResponse.to_json()) # convert the object into a dict list_prebuilt_image_response_dict = list_prebuilt_image_response_instance.to_dict() # create an instance of ListPrebuiltImageResponse from a dict -list_prebuilt_image_response_form_dict = list_prebuilt_image_response.from_dict(list_prebuilt_image_response_dict) +list_prebuilt_image_response_from_dict = ListPrebuiltImageResponse.from_dict(list_prebuilt_image_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LocationInner.md b/docs/LocationInner.md deleted file mode 100644 index 878b506..0000000 --- a/docs/LocationInner.md +++ /dev/null @@ -1,28 +0,0 @@ -# LocationInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from platform_api_client.models.location_inner import LocationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of LocationInner from a JSON string -location_inner_instance = LocationInner.from_json(json) -# print the JSON string representation of the object -print LocationInner.to_json() - -# convert the object into a dict -location_inner_dict = location_inner_instance.to_dict() -# create an instance of LocationInner from a dict -location_inner_form_dict = location_inner.from_dict(location_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Metric.md b/docs/Metric.md new file mode 100644 index 0000000..05ab957 --- /dev/null +++ b/docs/Metric.md @@ -0,0 +1,11 @@ +# Metric + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/PrebuiltImageResponse.md b/docs/PrebuiltImageResponse.md index 8395977..7bf3ad7 100644 --- a/docs/PrebuiltImageResponse.md +++ b/docs/PrebuiltImageResponse.md @@ -13,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from platform_api_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse # TODO update the JSON string below json = "{}" # create an instance of PrebuiltImageResponse from a JSON string prebuilt_image_response_instance = PrebuiltImageResponse.from_json(json) # print the JSON string representation of the object -print PrebuiltImageResponse.to_json() +print(PrebuiltImageResponse.to_json()) # convert the object into a dict prebuilt_image_response_dict = prebuilt_image_response_instance.to_dict() # create an instance of PrebuiltImageResponse from a dict -prebuilt_image_response_form_dict = prebuilt_image_response.from_dict(prebuilt_image_response_dict) +prebuilt_image_response_from_dict = PrebuiltImageResponse.from_dict(prebuilt_image_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ValidationError.md b/docs/ValidationError.md index 43f7836..0a9d146 100644 --- a/docs/ValidationError.md +++ b/docs/ValidationError.md @@ -5,26 +5,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loc** | [**List[LocationInner]**](LocationInner.md) | | +**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | **msg** | **str** | | **type** | **str** | | ## Example ```python -from platform_api_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error import ValidationError # TODO update the JSON string below json = "{}" # create an instance of ValidationError from a JSON string validation_error_instance = ValidationError.from_json(json) # print the JSON string representation of the object -print ValidationError.to_json() +print(ValidationError.to_json()) # convert the object into a dict validation_error_dict = validation_error_instance.to_dict() # create an instance of ValidationError from a dict -validation_error_form_dict = validation_error.from_dict(validation_error_dict) +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md new file mode 100644 index 0000000..cd238f4 --- /dev/null +++ b/docs/ValidationErrorLocInner.md @@ -0,0 +1,28 @@ +# ValidationErrorLocInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorLocInner from a JSON string +validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorLocInner.to_json()) + +# convert the object into a dict +validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict() +# create an instance of ValidationErrorLocInner from a dict +validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/git_push.sh b/git_push.sh index f53a75d..9a73e8a 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="centml" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="platform/client" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/platform_api_client/__init__.py b/platform_api_client/__init__.py deleted file mode 100644 index d82a881..0000000 --- a/platform_api_client/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from platform_api_client.api.external_api import EXTERNALApi - -# import ApiClient -from platform_api_client.api_response import ApiResponse -from platform_api_client.api_client import ApiClient -from platform_api_client.configuration import Configuration -from platform_api_client.exceptions import OpenApiException -from platform_api_client.exceptions import ApiTypeError -from platform_api_client.exceptions import ApiValueError -from platform_api_client.exceptions import ApiKeyError -from platform_api_client.exceptions import ApiAttributeError -from platform_api_client.exceptions import ApiException - -# import models into sdk package -from platform_api_client.models.client_secret_response import ClientSecretResponse -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse -from platform_api_client.models.create_payment_request import CreatePaymentRequest -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse -from platform_api_client.models.credits_response import CreditsResponse -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.endpoint_ready_state import EndpointReadyState -from platform_api_client.models.get_compute_deployment_response import GetComputeDeploymentResponse -from platform_api_client.models.get_deployment_log_response import GetDeploymentLogResponse -from platform_api_client.models.get_deployment_response import GetDeploymentResponse -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse -from platform_api_client.models.http_validation_error import HTTPValidationError -from platform_api_client.models.hardware_instance_response import HardwareInstanceResponse -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse -from platform_api_client.models.location_inner import LocationInner -from platform_api_client.models.prebuilt_image_response import PrebuiltImageResponse -from platform_api_client.models.validation_error import ValidationError diff --git a/platform_api_client/api/__init__.py b/platform_api_client/api/__init__.py deleted file mode 100644 index 8e81c20..0000000 --- a/platform_api_client/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from platform_api_client.api.external_api import EXTERNALApi - diff --git a/platform_api_client/models/__init__.py b/platform_api_client/models/__init__.py deleted file mode 100644 index fd3764c..0000000 --- a/platform_api_client/models/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from platform_api_client.models.client_secret_response import ClientSecretResponse -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse -from platform_api_client.models.create_payment_request import CreatePaymentRequest -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse -from platform_api_client.models.credits_response import CreditsResponse -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.endpoint_ready_state import EndpointReadyState -from platform_api_client.models.get_compute_deployment_response import GetComputeDeploymentResponse -from platform_api_client.models.get_deployment_log_response import GetDeploymentLogResponse -from platform_api_client.models.get_deployment_response import GetDeploymentResponse -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse -from platform_api_client.models.http_validation_error import HTTPValidationError -from platform_api_client.models.hardware_instance_response import HardwareInstanceResponse -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse -from platform_api_client.models.location_inner import LocationInner -from platform_api_client.models.prebuilt_image_response import PrebuiltImageResponse -from platform_api_client.models.validation_error import ValidationError diff --git a/platform_api_client/models/endpoint_ready_state.py b/platform_api_client/models/endpoint_ready_state.py deleted file mode 100644 index b976ec2..0000000 --- a/platform_api_client/models/endpoint_ready_state.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class EndpointReadyState(str, Enum): - """ - Enum for the ready state of an endpoint. - """ - - """ - allowed enum values - """ - UNKNOWN = 'UNKNOWN' - READY = 'READY' - NOT_READY = 'NOT_READY' - NOT_FOUND = 'NOT_FOUND' - FOUND_MULTIPLE = 'FOUND_MULTIPLE' - CONDITION_NOT_FOUND = 'CONDITION_NOT_FOUND' - INGRESS_RULE_NOT_FOUND = 'INGRESS_RULE_NOT_FOUND' - INGRESS_NOT_CONFIGURED = 'INGRESS_NOT_CONFIGURED' - CONTAINER_MISSING = 'CONTAINER_MISSING' - PROGRESS_DEADLINE_EXCEEDED = 'PROGRESS_DEADLINE_EXCEEDED' - REVISION_MISSING = 'REVISION_MISSING' - COMPLETE = 'COMPLETE' - FAILED_JOB = 'FAILED_JOB' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointReadyState from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py new file mode 100644 index 0000000..78cf854 --- /dev/null +++ b/platform_api_python_client/__init__.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from platform_api_python_client.api.external_api import EXTERNALApi + +# import ApiClient +from platform_api_python_client.api_response import ApiResponse +from platform_api_python_client.api_client import ApiClient +from platform_api_python_client.configuration import Configuration +from platform_api_python_client.exceptions import OpenApiException +from platform_api_python_client.exceptions import ApiTypeError +from platform_api_python_client.exceptions import ApiValueError +from platform_api_python_client.exceptions import ApiKeyError +from platform_api_python_client.exceptions import ApiAttributeError +from platform_api_python_client.exceptions import ApiException + +# import models into sdk package +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest +from platform_api_python_client.models.c_serve_recipe_input import CServeRecipeInput +from platform_api_python_client.models.c_serve_recipe_output import CServeRecipeOutput +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from platform_api_python_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.feedback_request import FeedbackRequest +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_deployment_v2_response import GetDeploymentV2Response +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse +from platform_api_python_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.health_status import HealthStatus +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/api/__init__.py b/platform_api_python_client/api/__init__.py new file mode 100644 index 0000000..bd125dd --- /dev/null +++ b/platform_api_python_client/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from platform_api_python_client.api.external_api import EXTERNALApi + diff --git a/platform_api_client/api/external_api.py b/platform_api_python_client/api/external_api.py similarity index 58% rename from platform_api_client/api/external_api.py rename to platform_api_python_client/api/external_api.py index 3715988..e8973b5 100644 --- a/platform_api_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -16,32 +16,43 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from datetime import date from pydantic import StrictInt, StrictStr from typing import Any, Optional -from platform_api_client.models.client_secret_response import ClientSecretResponse -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse -from platform_api_client.models.create_payment_request import CreatePaymentRequest -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse -from platform_api_client.models.credits_response import CreditsResponse -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.get_compute_deployment_response import GetComputeDeploymentResponse -from platform_api_client.models.get_deployment_log_response import GetDeploymentLogResponse -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse - -from platform_api_client.api_client import ApiClient, RequestSerialized -from platform_api_client.api_response import ApiResponse -from platform_api_client.rest import RESTResponseType +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest +from platform_api_python_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.feedback_request import FeedbackRequest +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.metric import Metric + +from platform_api_python_client.api_client import ApiClient, RequestSerialized +from platform_api_python_client.api_response import ApiResponse +from platform_api_python_client.rest import RESTResponseType class EXTERNALApi: @@ -58,9 +69,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def create_compute_deployment_deployments_compute_post( + def add_feedback_request_support_feedback_post( self, - create_compute_deployment_request: CreateComputeDeploymentRequest, + feedback_request: FeedbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -73,12 +84,12 @@ def create_compute_deployment_deployments_compute_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateComputeDeploymentResponse: - """Create Compute Deployment + ) -> object: + """Add Feedback Request - :param create_compute_deployment_request: (required) - :type create_compute_deployment_request: CreateComputeDeploymentRequest + :param feedback_request: (required) + :type feedback_request: FeedbackRequest :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 @@ -101,8 +112,8 @@ def create_compute_deployment_deployments_compute_post( :return: Returns the result object. """ # noqa: E501 - _param = self._create_compute_deployment_deployments_compute_post_serialize( - create_compute_deployment_request=create_compute_deployment_request, + _param = self._add_feedback_request_support_feedback_post_serialize( + feedback_request=feedback_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -110,7 +121,7 @@ def create_compute_deployment_deployments_compute_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateComputeDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -125,9 +136,9 @@ def create_compute_deployment_deployments_compute_post( @validate_call - def create_compute_deployment_deployments_compute_post_with_http_info( + def add_feedback_request_support_feedback_post_with_http_info( self, - create_compute_deployment_request: CreateComputeDeploymentRequest, + feedback_request: FeedbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -140,12 +151,12 @@ def create_compute_deployment_deployments_compute_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[CreateComputeDeploymentResponse]: - """Create Compute Deployment + ) -> ApiResponse[object]: + """Add Feedback Request - :param create_compute_deployment_request: (required) - :type create_compute_deployment_request: CreateComputeDeploymentRequest + :param feedback_request: (required) + :type feedback_request: FeedbackRequest :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 @@ -168,8 +179,8 @@ def create_compute_deployment_deployments_compute_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_compute_deployment_deployments_compute_post_serialize( - create_compute_deployment_request=create_compute_deployment_request, + _param = self._add_feedback_request_support_feedback_post_serialize( + feedback_request=feedback_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -177,7 +188,7 @@ def create_compute_deployment_deployments_compute_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateComputeDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -192,9 +203,9 @@ def create_compute_deployment_deployments_compute_post_with_http_info( @validate_call - def create_compute_deployment_deployments_compute_post_without_preload_content( + def add_feedback_request_support_feedback_post_without_preload_content( self, - create_compute_deployment_request: CreateComputeDeploymentRequest, + feedback_request: FeedbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -208,11 +219,11 @@ def create_compute_deployment_deployments_compute_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Compute Deployment + """Add Feedback Request - :param create_compute_deployment_request: (required) - :type create_compute_deployment_request: CreateComputeDeploymentRequest + :param feedback_request: (required) + :type feedback_request: FeedbackRequest :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 @@ -235,8 +246,8 @@ def create_compute_deployment_deployments_compute_post_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_compute_deployment_deployments_compute_post_serialize( - create_compute_deployment_request=create_compute_deployment_request, + _param = self._add_feedback_request_support_feedback_post_serialize( + feedback_request=feedback_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -244,7 +255,7 @@ def create_compute_deployment_deployments_compute_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateComputeDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -254,9 +265,9 @@ def create_compute_deployment_deployments_compute_post_without_preload_content( return response_data.response - def _create_compute_deployment_deployments_compute_post_serialize( + def _add_feedback_request_support_feedback_post_serialize( self, - create_compute_deployment_request, + feedback_request, _request_auth, _content_type, _headers, @@ -280,8 +291,8 @@ def _create_compute_deployment_deployments_compute_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_compute_deployment_request is not None: - _body_params = create_compute_deployment_request + if feedback_request is not None: + _body_params = feedback_request # set the HTTP header `Accept` @@ -312,7 +323,7 @@ def _create_compute_deployment_deployments_compute_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/deployments/compute', + resource_path='/support/feedback', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -329,9 +340,9 @@ def _create_compute_deployment_deployments_compute_post_serialize( @validate_call - def create_inference_deployment_deployments_inference_post( + def create_api_key_credentials_api_key_post( self, - create_inference_deployment_request: CreateInferenceDeploymentRequest, + api_key_request: APIKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -344,12 +355,12 @@ def create_inference_deployment_deployments_inference_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateInferenceDeploymentResponse: - """Create Inference Deployment + ) -> APIKeyResponse: + """Create Api Key - :param create_inference_deployment_request: (required) - :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :param api_key_request: (required) + :type api_key_request: APIKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -372,8 +383,8 @@ def create_inference_deployment_deployments_inference_post( :return: Returns the result object. """ # noqa: E501 - _param = self._create_inference_deployment_deployments_inference_post_serialize( - create_inference_deployment_request=create_inference_deployment_request, + _param = self._create_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -381,7 +392,7 @@ def create_inference_deployment_deployments_inference_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateInferenceDeploymentResponse", + '200': "APIKeyResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -396,9 +407,9 @@ def create_inference_deployment_deployments_inference_post( @validate_call - def create_inference_deployment_deployments_inference_post_with_http_info( + def create_api_key_credentials_api_key_post_with_http_info( self, - create_inference_deployment_request: CreateInferenceDeploymentRequest, + api_key_request: APIKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -411,12 +422,12 @@ def create_inference_deployment_deployments_inference_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[CreateInferenceDeploymentResponse]: - """Create Inference Deployment + ) -> ApiResponse[APIKeyResponse]: + """Create Api Key - :param create_inference_deployment_request: (required) - :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :param api_key_request: (required) + :type api_key_request: APIKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -439,8 +450,8 @@ def create_inference_deployment_deployments_inference_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_inference_deployment_deployments_inference_post_serialize( - create_inference_deployment_request=create_inference_deployment_request, + _param = self._create_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -448,7 +459,7 @@ def create_inference_deployment_deployments_inference_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateInferenceDeploymentResponse", + '200': "APIKeyResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -463,9 +474,9 @@ def create_inference_deployment_deployments_inference_post_with_http_info( @validate_call - def create_inference_deployment_deployments_inference_post_without_preload_content( + def create_api_key_credentials_api_key_post_without_preload_content( self, - create_inference_deployment_request: CreateInferenceDeploymentRequest, + api_key_request: APIKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -479,11 +490,11 @@ def create_inference_deployment_deployments_inference_post_without_preload_conte _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Inference Deployment + """Create Api Key - :param create_inference_deployment_request: (required) - :type create_inference_deployment_request: CreateInferenceDeploymentRequest + :param api_key_request: (required) + :type api_key_request: APIKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -506,8 +517,8 @@ def create_inference_deployment_deployments_inference_post_without_preload_conte :return: Returns the result object. """ # noqa: E501 - _param = self._create_inference_deployment_deployments_inference_post_serialize( - create_inference_deployment_request=create_inference_deployment_request, + _param = self._create_api_key_credentials_api_key_post_serialize( + api_key_request=api_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -515,7 +526,7 @@ def create_inference_deployment_deployments_inference_post_without_preload_conte ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateInferenceDeploymentResponse", + '200': "APIKeyResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -525,9 +536,9 @@ def create_inference_deployment_deployments_inference_post_without_preload_conte return response_data.response - def _create_inference_deployment_deployments_inference_post_serialize( + def _create_api_key_credentials_api_key_post_serialize( self, - create_inference_deployment_request, + api_key_request, _request_auth, _content_type, _headers, @@ -551,8 +562,8 @@ def _create_inference_deployment_deployments_inference_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_inference_deployment_request is not None: - _body_params = create_inference_deployment_request + if api_key_request is not None: + _body_params = api_key_request # set the HTTP header `Accept` @@ -583,7 +594,7 @@ def _create_inference_deployment_deployments_inference_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/deployments/inference', + resource_path='/credentials/api-key', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -600,9 +611,9 @@ def _create_inference_deployment_deployments_inference_post_serialize( @validate_call - def create_payment_payments_post( + def create_compute_deployment_deployments_v2_compute_post( self, - create_payment_request: CreatePaymentRequest, + create_compute_deployment_v2_request: CreateComputeDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -615,12 +626,12 @@ def create_payment_payments_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClientSecretResponse: - """Create Payment + ) -> CreateComputeDeploymentResponse: + """Create Compute Deployment - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest + :param create_compute_deployment_v2_request: (required) + :type create_compute_deployment_v2_request: CreateComputeDeploymentV2Request :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 @@ -643,8 +654,8 @@ def create_payment_payments_post( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_payments_post_serialize( - create_payment_request=create_payment_request, + _param = self._create_compute_deployment_deployments_v2_compute_post_serialize( + create_compute_deployment_v2_request=create_compute_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -652,7 +663,7 @@ def create_payment_payments_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateComputeDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -667,9 +678,9 @@ def create_payment_payments_post( @validate_call - def create_payment_payments_post_with_http_info( + def create_compute_deployment_deployments_v2_compute_post_with_http_info( self, - create_payment_request: CreatePaymentRequest, + create_compute_deployment_v2_request: CreateComputeDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -682,12 +693,12 @@ def create_payment_payments_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[ClientSecretResponse]: - """Create Payment + ) -> ApiResponse[CreateComputeDeploymentResponse]: + """Create Compute Deployment - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest + :param create_compute_deployment_v2_request: (required) + :type create_compute_deployment_v2_request: CreateComputeDeploymentV2Request :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 @@ -710,8 +721,8 @@ def create_payment_payments_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_payments_post_serialize( - create_payment_request=create_payment_request, + _param = self._create_compute_deployment_deployments_v2_compute_post_serialize( + create_compute_deployment_v2_request=create_compute_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -719,7 +730,7 @@ def create_payment_payments_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateComputeDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -734,9 +745,9 @@ def create_payment_payments_post_with_http_info( @validate_call - def create_payment_payments_post_without_preload_content( + def create_compute_deployment_deployments_v2_compute_post_without_preload_content( self, - create_payment_request: CreatePaymentRequest, + create_compute_deployment_v2_request: CreateComputeDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -750,11 +761,11 @@ def create_payment_payments_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Payment + """Create Compute Deployment - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest + :param create_compute_deployment_v2_request: (required) + :type create_compute_deployment_v2_request: CreateComputeDeploymentV2Request :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 @@ -777,8 +788,8 @@ def create_payment_payments_post_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_payments_post_serialize( - create_payment_request=create_payment_request, + _param = self._create_compute_deployment_deployments_v2_compute_post_serialize( + create_compute_deployment_v2_request=create_compute_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -786,7 +797,7 @@ def create_payment_payments_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateComputeDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -796,9 +807,9 @@ def create_payment_payments_post_without_preload_content( return response_data.response - def _create_payment_payments_post_serialize( + def _create_compute_deployment_deployments_v2_compute_post_serialize( self, - create_payment_request, + create_compute_deployment_v2_request, _request_auth, _content_type, _headers, @@ -822,8 +833,8 @@ def _create_payment_payments_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_payment_request is not None: - _body_params = create_payment_request + if create_compute_deployment_v2_request is not None: + _body_params = create_compute_deployment_v2_request # set the HTTP header `Accept` @@ -854,7 +865,7 @@ def _create_payment_payments_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments', + resource_path='/deployments/v2/compute', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -871,8 +882,9 @@ def _create_payment_payments_post_serialize( @validate_call - def create_payment_setup_payments_setup_post( + def create_cserve_deployment_deployments_v2_cserve_post( self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -885,10 +897,12 @@ def create_payment_setup_payments_setup_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClientSecretResponse: - """Create Payment Setup + ) -> CreateCServeDeploymentResponse: + """Create Cserve Deployment + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -911,7 +925,8 @@ def create_payment_setup_payments_setup_post( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_setup_payments_setup_post_serialize( + _param = self._create_cserve_deployment_deployments_v2_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -919,7 +934,8 @@ def create_payment_setup_payments_setup_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -933,8 +949,9 @@ def create_payment_setup_payments_setup_post( @validate_call - def create_payment_setup_payments_setup_post_with_http_info( + def create_cserve_deployment_deployments_v2_cserve_post_with_http_info( self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -947,10 +964,12 @@ def create_payment_setup_payments_setup_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[ClientSecretResponse]: - """Create Payment Setup + ) -> ApiResponse[CreateCServeDeploymentResponse]: + """Create Cserve Deployment + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -973,7 +992,8 @@ def create_payment_setup_payments_setup_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_setup_payments_setup_post_serialize( + _param = self._create_cserve_deployment_deployments_v2_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -981,7 +1001,8 @@ def create_payment_setup_payments_setup_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -995,8 +1016,9 @@ def create_payment_setup_payments_setup_post_with_http_info( @validate_call - def create_payment_setup_payments_setup_post_without_preload_content( + def create_cserve_deployment_deployments_v2_cserve_post_without_preload_content( self, + create_c_serve_deployment_request: CreateCServeDeploymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1010,9 +1032,11 @@ def create_payment_setup_payments_setup_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Payment Setup + """Create Cserve Deployment + :param create_c_serve_deployment_request: (required) + :type create_c_serve_deployment_request: CreateCServeDeploymentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1035,7 +1059,8 @@ def create_payment_setup_payments_setup_post_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_setup_payments_setup_post_serialize( + _param = self._create_cserve_deployment_deployments_v2_cserve_post_serialize( + create_c_serve_deployment_request=create_c_serve_deployment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1043,7 +1068,8 @@ def create_payment_setup_payments_setup_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClientSecretResponse", + '200': "CreateCServeDeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -1052,8 +1078,9 @@ def create_payment_setup_payments_setup_post_without_preload_content( return response_data.response - def _create_payment_setup_payments_setup_post_serialize( + def _create_cserve_deployment_deployments_v2_cserve_post_serialize( self, + create_c_serve_deployment_request, _request_auth, _content_type, _headers, @@ -1077,6 +1104,8 @@ def _create_payment_setup_payments_setup_post_serialize( # process the header parameters # process the form parameters # process the body parameter + if create_c_serve_deployment_request is not None: + _body_params = create_c_serve_deployment_request # set the HTTP header `Accept` @@ -1086,6 +1115,19 @@ def _create_payment_setup_payments_setup_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] = [ @@ -1094,7 +1136,7 @@ def _create_payment_setup_payments_setup_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/setup', + resource_path='/deployments/v2/cserve', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1111,9 +1153,9 @@ def _create_payment_setup_payments_setup_post_serialize( @validate_call - def create_training_deployment_deployments_training_post( + def create_hardware_request_support_hardware_request_post( self, - create_training_deployment_request: CreateTrainingDeploymentRequest, + add_hardware_request: AddHardwareRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1126,12 +1168,12 @@ def create_training_deployment_deployments_training_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateTrainingDeploymentResponse: - """Create Training Deployment + ) -> object: + """Create Hardware Request - :param create_training_deployment_request: (required) - :type create_training_deployment_request: CreateTrainingDeploymentRequest + :param add_hardware_request: (required) + :type add_hardware_request: AddHardwareRequest :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 @@ -1154,8 +1196,8 @@ def create_training_deployment_deployments_training_post( :return: Returns the result object. """ # noqa: E501 - _param = self._create_training_deployment_deployments_training_post_serialize( - create_training_deployment_request=create_training_deployment_request, + _param = self._create_hardware_request_support_hardware_request_post_serialize( + add_hardware_request=add_hardware_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1163,7 +1205,7 @@ def create_training_deployment_deployments_training_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateTrainingDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1178,9 +1220,9 @@ def create_training_deployment_deployments_training_post( @validate_call - def create_training_deployment_deployments_training_post_with_http_info( + def create_hardware_request_support_hardware_request_post_with_http_info( self, - create_training_deployment_request: CreateTrainingDeploymentRequest, + add_hardware_request: AddHardwareRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1193,12 +1235,12 @@ def create_training_deployment_deployments_training_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[CreateTrainingDeploymentResponse]: - """Create Training Deployment + ) -> ApiResponse[object]: + """Create Hardware Request - :param create_training_deployment_request: (required) - :type create_training_deployment_request: CreateTrainingDeploymentRequest + :param add_hardware_request: (required) + :type add_hardware_request: AddHardwareRequest :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 @@ -1221,8 +1263,8 @@ def create_training_deployment_deployments_training_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_training_deployment_deployments_training_post_serialize( - create_training_deployment_request=create_training_deployment_request, + _param = self._create_hardware_request_support_hardware_request_post_serialize( + add_hardware_request=add_hardware_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1230,7 +1272,7 @@ def create_training_deployment_deployments_training_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateTrainingDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1245,9 +1287,9 @@ def create_training_deployment_deployments_training_post_with_http_info( @validate_call - def create_training_deployment_deployments_training_post_without_preload_content( + def create_hardware_request_support_hardware_request_post_without_preload_content( self, - create_training_deployment_request: CreateTrainingDeploymentRequest, + add_hardware_request: AddHardwareRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1261,11 +1303,11 @@ def create_training_deployment_deployments_training_post_without_preload_content _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Training Deployment + """Create Hardware Request - :param create_training_deployment_request: (required) - :type create_training_deployment_request: CreateTrainingDeploymentRequest + :param add_hardware_request: (required) + :type add_hardware_request: AddHardwareRequest :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 @@ -1288,8 +1330,8 @@ def create_training_deployment_deployments_training_post_without_preload_content :return: Returns the result object. """ # noqa: E501 - _param = self._create_training_deployment_deployments_training_post_serialize( - create_training_deployment_request=create_training_deployment_request, + _param = self._create_hardware_request_support_hardware_request_post_serialize( + add_hardware_request=add_hardware_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1297,7 +1339,7 @@ def create_training_deployment_deployments_training_post_without_preload_content ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateTrainingDeploymentResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1307,9 +1349,9 @@ def create_training_deployment_deployments_training_post_without_preload_content return response_data.response - def _create_training_deployment_deployments_training_post_serialize( + def _create_hardware_request_support_hardware_request_post_serialize( self, - create_training_deployment_request, + add_hardware_request, _request_auth, _content_type, _headers, @@ -1333,8 +1375,8 @@ def _create_training_deployment_deployments_training_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_training_deployment_request is not None: - _body_params = create_training_deployment_request + if add_hardware_request is not None: + _body_params = add_hardware_request # set the HTTP header `Accept` @@ -1365,7 +1407,7 @@ def _create_training_deployment_deployments_training_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/deployments/training', + resource_path='/support/hardware-request', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1382,9 +1424,9 @@ def _create_training_deployment_deployments_training_post_serialize( @validate_call - def delete_payment_method_payments_methods_payment_method_delete( + def create_inference_deployment_deployments_v2_inference_post( self, - payment_method: StrictStr, + create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1397,12 +1439,12 @@ def delete_payment_method_payments_methods_payment_method_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Delete Payment Method + ) -> CreateInferenceDeploymentResponse: + """Create Inference Deployment - :param payment_method: (required) - :type payment_method: str + :param create_inference_deployment_v2_request: (required) + :type create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request :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 @@ -1425,8 +1467,8 @@ def delete_payment_method_payments_methods_payment_method_delete( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( - payment_method=payment_method, + _param = self._create_inference_deployment_deployments_v2_inference_post_serialize( + create_inference_deployment_v2_request=create_inference_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1434,7 +1476,7 @@ def delete_payment_method_payments_methods_payment_method_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "CreateInferenceDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1449,9 +1491,9 @@ def delete_payment_method_payments_methods_payment_method_delete( @validate_call - def delete_payment_method_payments_methods_payment_method_delete_with_http_info( + def create_inference_deployment_deployments_v2_inference_post_with_http_info( self, - payment_method: StrictStr, + create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1464,12 +1506,12 @@ def delete_payment_method_payments_methods_payment_method_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 Payment Method + ) -> ApiResponse[CreateInferenceDeploymentResponse]: + """Create Inference Deployment - :param payment_method: (required) - :type payment_method: str + :param create_inference_deployment_v2_request: (required) + :type create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request :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 @@ -1492,8 +1534,8 @@ def delete_payment_method_payments_methods_payment_method_delete_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( - payment_method=payment_method, + _param = self._create_inference_deployment_deployments_v2_inference_post_serialize( + create_inference_deployment_v2_request=create_inference_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1501,7 +1543,7 @@ def delete_payment_method_payments_methods_payment_method_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "CreateInferenceDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1516,9 +1558,9 @@ def delete_payment_method_payments_methods_payment_method_delete_with_http_info( @validate_call - def delete_payment_method_payments_methods_payment_method_delete_without_preload_content( + def create_inference_deployment_deployments_v2_inference_post_without_preload_content( self, - payment_method: StrictStr, + create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1532,11 +1574,11 @@ def delete_payment_method_payments_methods_payment_method_delete_without_preload _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Payment Method + """Create Inference Deployment - :param payment_method: (required) - :type payment_method: str + :param create_inference_deployment_v2_request: (required) + :type create_inference_deployment_v2_request: CreateInferenceDeploymentV2Request :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 @@ -1559,8 +1601,8 @@ def delete_payment_method_payments_methods_payment_method_delete_without_preload :return: Returns the result object. """ # noqa: E501 - _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( - payment_method=payment_method, + _param = self._create_inference_deployment_deployments_v2_inference_post_serialize( + create_inference_deployment_v2_request=create_inference_deployment_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1568,7 +1610,7 @@ def delete_payment_method_payments_methods_payment_method_delete_without_preload ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "CreateInferenceDeploymentResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1578,9 +1620,9 @@ def delete_payment_method_payments_methods_payment_method_delete_without_preload return response_data.response - def _delete_payment_method_payments_methods_payment_method_delete_serialize( + def _create_inference_deployment_deployments_v2_inference_post_serialize( self, - payment_method, + create_inference_deployment_v2_request, _request_auth, _content_type, _headers, @@ -1600,12 +1642,12 @@ def _delete_payment_method_payments_methods_payment_method_delete_serialize( _body_params: Optional[bytes] = None # process the path parameters - if payment_method is not None: - _path_params['payment_method'] = payment_method # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if create_inference_deployment_v2_request is not None: + _body_params = create_inference_deployment_v2_request # set the HTTP header `Accept` @@ -1615,6 +1657,19 @@ def _delete_payment_method_payments_methods_payment_method_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] = [ @@ -1622,8 +1677,8 @@ def _delete_payment_method_payments_methods_payment_method_delete_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/payments/methods/{payment_method}', + method='POST', + resource_path='/deployments/v2/inference', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1640,9 +1695,9 @@ def _delete_payment_method_payments_methods_payment_method_delete_serialize( @validate_call - def get_compute_deployment_deployments_compute_deployment_id_get( + def create_payment_payments_post( self, - deployment_id: StrictInt, + create_payment_request: CreatePaymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1655,12 +1710,12 @@ def get_compute_deployment_deployments_compute_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetComputeDeploymentResponse: - """Get Compute Deployment + ) -> ClientSecretResponse: + """Create Payment - :param deployment_id: (required) - :type deployment_id: int + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest :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 @@ -1683,8 +1738,8 @@ def get_compute_deployment_deployments_compute_deployment_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_compute_deployment_deployments_compute_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._create_payment_payments_post_serialize( + create_payment_request=create_payment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1692,7 +1747,7 @@ def get_compute_deployment_deployments_compute_deployment_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetComputeDeploymentResponse", + '200': "ClientSecretResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1707,9 +1762,9 @@ def get_compute_deployment_deployments_compute_deployment_id_get( @validate_call - def get_compute_deployment_deployments_compute_deployment_id_get_with_http_info( + def create_payment_payments_post_with_http_info( self, - deployment_id: StrictInt, + create_payment_request: CreatePaymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1722,12 +1777,12 @@ def get_compute_deployment_deployments_compute_deployment_id_get_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[GetComputeDeploymentResponse]: - """Get Compute Deployment + ) -> ApiResponse[ClientSecretResponse]: + """Create Payment - :param deployment_id: (required) - :type deployment_id: int + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest :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 @@ -1750,8 +1805,8 @@ def get_compute_deployment_deployments_compute_deployment_id_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_compute_deployment_deployments_compute_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._create_payment_payments_post_serialize( + create_payment_request=create_payment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1759,7 +1814,7 @@ def get_compute_deployment_deployments_compute_deployment_id_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetComputeDeploymentResponse", + '200': "ClientSecretResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1774,9 +1829,9 @@ def get_compute_deployment_deployments_compute_deployment_id_get_with_http_info( @validate_call - def get_compute_deployment_deployments_compute_deployment_id_get_without_preload_content( + def create_payment_payments_post_without_preload_content( self, - deployment_id: StrictInt, + create_payment_request: CreatePaymentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1790,11 +1845,11 @@ def get_compute_deployment_deployments_compute_deployment_id_get_without_preload _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Compute Deployment + """Create Payment - :param deployment_id: (required) - :type deployment_id: int + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest :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 @@ -1817,8 +1872,8 @@ def get_compute_deployment_deployments_compute_deployment_id_get_without_preload :return: Returns the result object. """ # noqa: E501 - _param = self._get_compute_deployment_deployments_compute_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._create_payment_payments_post_serialize( + create_payment_request=create_payment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1826,7 +1881,7 @@ def get_compute_deployment_deployments_compute_deployment_id_get_without_preload ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetComputeDeploymentResponse", + '200': "ClientSecretResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1836,9 +1891,9 @@ def get_compute_deployment_deployments_compute_deployment_id_get_without_preload return response_data.response - def _get_compute_deployment_deployments_compute_deployment_id_get_serialize( + def _create_payment_payments_post_serialize( self, - deployment_id, + create_payment_request, _request_auth, _content_type, _headers, @@ -1858,12 +1913,12 @@ def _get_compute_deployment_deployments_compute_deployment_id_get_serialize( _body_params: Optional[bytes] = None # process the path parameters - if deployment_id is not None: - _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if create_payment_request is not None: + _body_params = create_payment_request # set the HTTP header `Accept` @@ -1873,6 +1928,19 @@ def _get_compute_deployment_deployments_compute_deployment_id_get_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] = [ @@ -1880,8 +1948,8 @@ def _get_compute_deployment_deployments_compute_deployment_id_get_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/deployments/compute/{deployment_id}', + method='POST', + resource_path='/payments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1898,7 +1966,7 @@ def _get_compute_deployment_deployments_compute_deployment_id_get_serialize( @validate_call - def get_credits_credits_get( + def create_payment_setup_payments_setup_post( self, _request_timeout: Union[ None, @@ -1912,8 +1980,8 @@ def get_credits_credits_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreditsResponse: - """Get Credits + ) -> ClientSecretResponse: + """Create Payment Setup :param _request_timeout: timeout setting for this request. If one @@ -1938,7 +2006,7 @@ def get_credits_credits_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credits_credits_get_serialize( + _param = self._create_payment_setup_payments_setup_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1946,7 +2014,7 @@ def get_credits_credits_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreditsResponse", + '200': "ClientSecretResponse", } response_data = self.api_client.call_api( *_param, @@ -1960,7 +2028,7 @@ def get_credits_credits_get( @validate_call - def get_credits_credits_get_with_http_info( + def create_payment_setup_payments_setup_post_with_http_info( self, _request_timeout: Union[ None, @@ -1974,8 +2042,8 @@ def get_credits_credits_get_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[CreditsResponse]: - """Get Credits + ) -> ApiResponse[ClientSecretResponse]: + """Create Payment Setup :param _request_timeout: timeout setting for this request. If one @@ -2000,7 +2068,7 @@ def get_credits_credits_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credits_credits_get_serialize( + _param = self._create_payment_setup_payments_setup_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2008,7 +2076,7 @@ def get_credits_credits_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreditsResponse", + '200': "ClientSecretResponse", } response_data = self.api_client.call_api( *_param, @@ -2022,7 +2090,7 @@ def get_credits_credits_get_with_http_info( @validate_call - def get_credits_credits_get_without_preload_content( + def create_payment_setup_payments_setup_post_without_preload_content( self, _request_timeout: Union[ None, @@ -2037,7 +2105,7 @@ def get_credits_credits_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Credits + """Create Payment Setup :param _request_timeout: timeout setting for this request. If one @@ -2062,7 +2130,7 @@ def get_credits_credits_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credits_credits_get_serialize( + _param = self._create_payment_setup_payments_setup_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2070,7 +2138,7 @@ def get_credits_credits_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreditsResponse", + '200': "ClientSecretResponse", } response_data = self.api_client.call_api( *_param, @@ -2079,7 +2147,7 @@ def get_credits_credits_get_without_preload_content( return response_data.response - def _get_credits_credits_get_serialize( + def _create_payment_setup_payments_setup_post_serialize( self, _request_auth, _content_type, @@ -2120,8 +2188,8 @@ def _get_credits_credits_get_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/credits', + method='POST', + resource_path='/payments/setup', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2138,12 +2206,9 @@ def _get_credits_credits_get_serialize( @validate_call - def get_deployment_logs_deployments_logs_deployment_id_get( + def delete_api_key_credentials_api_key_id_delete( self, - deployment_id: StrictInt, - start_time: StrictInt, - end_time: StrictInt, - next_page_token: Optional[StrictStr] = None, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2156,18 +2221,2617 @@ def get_deployment_logs_deployments_logs_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDeploymentLogResponse: - """Get Deployment Logs + ) -> object: + """Delete Api Key + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_api_key_credentials_api_key_id_delete_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Api Key + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_api_key_credentials_api_key_id_delete_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Api Key + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_api_key_credentials_api_key_id_delete_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_api_key_credentials_api_key_id_delete_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/credentials/api-key/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_payment_method_payments_methods_payment_method_delete( + self, + payment_method: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Payment Method + + + :param payment_method: (required) + :type payment_method: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( + payment_method=payment_method, + _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_payment_method_payments_methods_payment_method_delete_with_http_info( + self, + payment_method: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Payment Method + + + :param payment_method: (required) + :type payment_method: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( + payment_method=payment_method, + _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_payment_method_payments_methods_payment_method_delete_without_preload_content( + self, + payment_method: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Payment Method + + + :param payment_method: (required) + :type payment_method: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_payment_method_payments_methods_payment_method_delete_serialize( + payment_method=payment_method, + _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_payment_method_payments_methods_payment_method_delete_serialize( + self, + payment_method, + _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]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if payment_method is not None: + _path_params['payment_method'] = payment_method + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _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='/payments/methods/{payment_method}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_api_keys_credentials_api_key_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListAPIKeyResponse: + """Get Api Keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_api_keys_credentials_api_key_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListAPIKeyResponse]: + """Get Api Keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_api_keys_credentials_api_key_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Api Keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_api_keys_credentials_api_key_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAPIKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_api_keys_credentials_api_key_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/credentials/api-key', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_clusters_clusters_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGetClusterResponse: + """Get Clusters + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_clusters_clusters_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListGetClusterResponse]: + """Get Clusters + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_clusters_clusters_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Clusters + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_clusters_clusters_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGetClusterResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_clusters_clusters_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/clusters', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_compute_deployment_deployments_v2_compute_deployment_id_get( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetComputeV2DeploymentResponse: + """Get Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_compute_deployment_deployments_v2_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_compute_deployment_deployments_v2_compute_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetComputeV2DeploymentResponse]: + """Get Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_compute_deployment_deployments_v2_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_compute_deployment_deployments_v2_compute_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Compute Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_compute_deployment_deployments_v2_compute_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetComputeV2DeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_compute_deployment_deployments_v2_compute_deployment_id_get_serialize( + self, + deployment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/v2/compute/{deployment_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_credits_credits_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreditsResponse: + """Get Credits + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_credits_credits_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreditsResponse]: + """Get Credits + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_credits_credits_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Credits + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_credits_credits_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreditsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_credits_credits_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/credits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_cserve_deployment_deployments_v2_cserve_deployment_id_get( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetCServeDeploymentResponse: + """Get Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_deployment_deployments_v2_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cserve_deployment_deployments_v2_cserve_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetCServeDeploymentResponse]: + """Get Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_deployment_deployments_v2_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cserve_deployment_deployments_v2_cserve_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Cserve Deployment + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_deployment_deployments_v2_cserve_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCServeDeploymentResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cserve_deployment_deployments_v2_cserve_deployment_id_get_serialize( + self, + deployment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/v2/cserve/{deployment_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_cserve_recipe_deployments_v2_cserve_recipes_get( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListCServeRecipeResponse: + """Get Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_recipe_deployments_v2_cserve_recipes_get_serialize( + model=model, + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cserve_recipe_deployments_v2_cserve_recipes_get_with_http_info( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListCServeRecipeResponse]: + """Get Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_recipe_deployments_v2_cserve_recipes_get_serialize( + model=model, + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cserve_recipe_deployments_v2_cserve_recipes_get_without_preload_content( + self, + model: Optional[StrictStr] = None, + cluster_id: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Cserve Recipe + + + :param model: + :type model: str + :param cluster_id: + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cserve_recipe_deployments_v2_cserve_recipes_get_serialize( + model=model, + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCServeRecipeResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cserve_recipe_deployments_v2_cserve_recipes_get_serialize( + self, + model, + cluster_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if model is not None: + + _query_params.append(('model', model)) + + if cluster_id is not None: + + _query_params.append(('cluster_id', cluster_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/v2/cserve/recipes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_deployment_logs_deployments_logs_deployment_id_get( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetDeploymentLogResponse: + """Get Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetDeploymentLogResponse]: + """Get Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Deployment Logs + + + :param deployment_id: (required) + :type deployment_id: int + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param next_page_token: + :type next_page_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( + deployment_id=deployment_id, + start_time=start_time, + end_time=end_time, + next_page_token=next_page_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetDeploymentLogResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( + self, + deployment_id, + start_time, + end_time, + next_page_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + if next_page_token is not None: + + _query_params.append(('next_page_token', next_page_token)) + + if start_time is not None: + + _query_params.append(('start_time', start_time)) + + if end_time is not None: + + _query_params.append(('end_time', end_time)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/logs/{deployment_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_deployment_status_deployments_v2_status_deployment_id_get( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeploymentStatusResponseV2: + """Get Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_status_deployments_v2_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponseV2", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_deployment_status_deployments_v2_status_deployment_id_get_with_http_info( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeploymentStatusResponseV2]: + """Get Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_status_deployments_v2_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponseV2", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_deployment_status_deployments_v2_status_deployment_id_get_without_preload_content( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Deployment Status + + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_deployment_status_deployments_v2_status_deployment_id_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentStatusResponseV2", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response - :param deployment_id: (required) - :type deployment_id: int - :param start_time: (required) - :type start_time: int - :param end_time: (required) - :type end_time: int - :param next_page_token: - :type next_page_token: str + + def _get_deployment_status_deployments_v2_status_deployment_id_get_serialize( + self, + deployment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/v2/status/{deployment_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_deployments_deployments_v2_get( + self, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGetDeploymentV2Response: + """Get Deployments + + + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2190,11 +4854,11 @@ def get_deployment_logs_deployments_logs_deployment_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( - deployment_id=deployment_id, - start_time=start_time, - end_time=end_time, - next_page_token=next_page_token, + _param = self._get_deployments_deployments_v2_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2202,7 +4866,7 @@ def get_deployment_logs_deployments_logs_deployment_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDeploymentLogResponse", + '200': "ListGetDeploymentV2Response", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2217,12 +4881,12 @@ def get_deployment_logs_deployments_logs_deployment_id_get( @validate_call - def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( + def get_deployments_deployments_v2_get_with_http_info( self, - deployment_id: StrictInt, - start_time: StrictInt, - end_time: StrictInt, - next_page_token: Optional[StrictStr] = None, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2235,18 +4899,18 @@ def get_deployment_logs_deployments_logs_deployment_id_get_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[GetDeploymentLogResponse]: - """Get Deployment Logs + ) -> ApiResponse[ListGetDeploymentV2Response]: + """Get Deployments - :param deployment_id: (required) - :type deployment_id: int - :param start_time: (required) - :type start_time: int - :param end_time: (required) - :type end_time: int - :param next_page_token: - :type next_page_token: str + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2269,11 +4933,11 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( - deployment_id=deployment_id, - start_time=start_time, - end_time=end_time, - next_page_token=next_page_token, + _param = self._get_deployments_deployments_v2_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2281,7 +4945,7 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDeploymentLogResponse", + '200': "ListGetDeploymentV2Response", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2296,12 +4960,12 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( @validate_call - def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_content( + def get_deployments_deployments_v2_get_without_preload_content( self, - deployment_id: StrictInt, - start_time: StrictInt, - end_time: StrictInt, - next_page_token: Optional[StrictStr] = None, + offset: Optional[StrictInt] = None, + limit: Optional[StrictInt] = None, + type: Optional[DeploymentType] = None, + search_query: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2315,17 +4979,17 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Deployment Logs + """Get Deployments - :param deployment_id: (required) - :type deployment_id: int - :param start_time: (required) - :type start_time: int - :param end_time: (required) - :type end_time: int - :param next_page_token: - :type next_page_token: str + :param offset: + :type offset: int + :param limit: + :type limit: int + :param type: + :type type: DeploymentType + :param search_query: + :type search_query: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2348,11 +5012,11 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_logs_deployments_logs_deployment_id_get_serialize( - deployment_id=deployment_id, - start_time=start_time, - end_time=end_time, - next_page_token=next_page_token, + _param = self._get_deployments_deployments_v2_get_serialize( + offset=offset, + limit=limit, + type=type, + search_query=search_query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2360,7 +5024,7 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDeploymentLogResponse", + '200': "ListGetDeploymentV2Response", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2370,12 +5034,12 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte return response_data.response - def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( + def _get_deployments_deployments_v2_get_serialize( self, - deployment_id, - start_time, - end_time, - next_page_token, + offset, + limit, + type, + search_query, _request_auth, _content_type, _headers, @@ -2395,20 +5059,22 @@ def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( _body_params: Optional[bytes] = None # process the path parameters - if deployment_id is not None: - _path_params['deployment_id'] = deployment_id # process the query parameters - if next_page_token is not None: + if offset is not None: - _query_params.append(('next_page_token', next_page_token)) + _query_params.append(('offset', offset)) - if start_time is not None: + if limit is not None: - _query_params.append(('start_time', start_time)) + _query_params.append(('limit', limit)) - if end_time is not None: + if type is not None: - _query_params.append(('end_time', end_time)) + _query_params.append(('type', type.value)) + + if search_query is not None: + + _query_params.append(('search_query', search_query)) # process the header parameters # process the form parameters @@ -2430,7 +5096,7 @@ def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/deployments/logs/{deployment_id}', + resource_path='/deployments/v2', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2447,9 +5113,8 @@ def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( @validate_call - def get_deployment_status_deployments_status_deployment_id_get( + def get_hardware_instances_hardware_instances_get( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2462,12 +5127,10 @@ def get_deployment_status_deployments_status_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeploymentStatusResponse: - """Get Deployment Status + ) -> ListHardwareInstanceResponse: + """Get Hardware Instances - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2490,8 +5153,7 @@ def get_deployment_status_deployments_status_deployment_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_status_deployments_status_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_hardware_instances_hardware_instances_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2499,8 +5161,7 @@ def get_deployment_status_deployments_status_deployment_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", - '422': "HTTPValidationError", + '200': "ListHardwareInstanceResponse", } response_data = self.api_client.call_api( *_param, @@ -2514,9 +5175,8 @@ def get_deployment_status_deployments_status_deployment_id_get( @validate_call - def get_deployment_status_deployments_status_deployment_id_get_with_http_info( + def get_hardware_instances_hardware_instances_get_with_http_info( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2529,12 +5189,10 @@ def get_deployment_status_deployments_status_deployment_id_get_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[DeploymentStatusResponse]: - """Get Deployment Status + ) -> ApiResponse[ListHardwareInstanceResponse]: + """Get Hardware Instances - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2557,8 +5215,7 @@ def get_deployment_status_deployments_status_deployment_id_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_status_deployments_status_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_hardware_instances_hardware_instances_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2566,8 +5223,7 @@ def get_deployment_status_deployments_status_deployment_id_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", - '422': "HTTPValidationError", + '200': "ListHardwareInstanceResponse", } response_data = self.api_client.call_api( *_param, @@ -2581,9 +5237,8 @@ def get_deployment_status_deployments_status_deployment_id_get_with_http_info( @validate_call - def get_deployment_status_deployments_status_deployment_id_get_without_preload_content( + def get_hardware_instances_hardware_instances_get_without_preload_content( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2597,11 +5252,9 @@ def get_deployment_status_deployments_status_deployment_id_get_without_preload_c _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Deployment Status + """Get Hardware Instances - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2624,8 +5277,7 @@ def get_deployment_status_deployments_status_deployment_id_get_without_preload_c :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployment_status_deployments_status_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_hardware_instances_hardware_instances_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2633,8 +5285,7 @@ def get_deployment_status_deployments_status_deployment_id_get_without_preload_c ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", - '422': "HTTPValidationError", + '200': "ListHardwareInstanceResponse", } response_data = self.api_client.call_api( *_param, @@ -2643,9 +5294,8 @@ def get_deployment_status_deployments_status_deployment_id_get_without_preload_c return response_data.response - def _get_deployment_status_deployments_status_deployment_id_get_serialize( + def _get_hardware_instances_hardware_instances_get_serialize( self, - deployment_id, _request_auth, _content_type, _headers, @@ -2665,8 +5315,6 @@ def _get_deployment_status_deployments_status_deployment_id_get_serialize( _body_params: Optional[bytes] = None # process the path parameters - if deployment_id is not None: - _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -2688,7 +5336,7 @@ def _get_deployment_status_deployments_status_deployment_id_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/deployments/status/{deployment_id}', + resource_path='/hardware-instances', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2705,12 +5353,9 @@ def _get_deployment_status_deployments_status_deployment_id_get_serialize( @validate_call - def get_deployments_deployments_get( + def get_hardware_instances_hardware_instances_v2_get( self, - offset: Optional[StrictInt] = None, - limit: Optional[StrictInt] = None, - type: Optional[DeploymentType] = None, - search_query: Optional[StrictStr] = None, + cluster_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2723,18 +5368,12 @@ def get_deployments_deployments_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListGetDeploymentResponse: - """Get Deployments + ) -> ListHardwareInstanceResponse: + """Get Hardware Instances - :param offset: - :type offset: int - :param limit: - :type limit: int - :param type: - :type type: DeploymentType - :param search_query: - :type search_query: str + :param cluster_id: (required) + :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 @@ -2757,11 +5396,8 @@ def get_deployments_deployments_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployments_deployments_get_serialize( - offset=offset, - limit=limit, - type=type, - search_query=search_query, + _param = self._get_hardware_instances_hardware_instances_v2_get_serialize( + cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2769,7 +5405,7 @@ def get_deployments_deployments_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGetDeploymentResponse", + '200': "ListHardwareInstanceResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2784,12 +5420,9 @@ def get_deployments_deployments_get( @validate_call - def get_deployments_deployments_get_with_http_info( + def get_hardware_instances_hardware_instances_v2_get_with_http_info( self, - offset: Optional[StrictInt] = None, - limit: Optional[StrictInt] = None, - type: Optional[DeploymentType] = None, - search_query: Optional[StrictStr] = None, + cluster_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2802,18 +5435,12 @@ def get_deployments_deployments_get_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[ListGetDeploymentResponse]: - """Get Deployments + ) -> ApiResponse[ListHardwareInstanceResponse]: + """Get Hardware Instances - :param offset: - :type offset: int - :param limit: - :type limit: int - :param type: - :type type: DeploymentType - :param search_query: - :type search_query: str + :param cluster_id: (required) + :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 @@ -2836,11 +5463,8 @@ def get_deployments_deployments_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployments_deployments_get_serialize( - offset=offset, - limit=limit, - type=type, - search_query=search_query, + _param = self._get_hardware_instances_hardware_instances_v2_get_serialize( + cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2848,7 +5472,7 @@ def get_deployments_deployments_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGetDeploymentResponse", + '200': "ListHardwareInstanceResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2863,12 +5487,9 @@ def get_deployments_deployments_get_with_http_info( @validate_call - def get_deployments_deployments_get_without_preload_content( + def get_hardware_instances_hardware_instances_v2_get_without_preload_content( self, - offset: Optional[StrictInt] = None, - limit: Optional[StrictInt] = None, - type: Optional[DeploymentType] = None, - search_query: Optional[StrictStr] = None, + cluster_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2882,17 +5503,11 @@ def get_deployments_deployments_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Deployments + """Get Hardware Instances - :param offset: - :type offset: int - :param limit: - :type limit: int - :param type: - :type type: DeploymentType - :param search_query: - :type search_query: str + :param cluster_id: (required) + :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 @@ -2915,11 +5530,8 @@ def get_deployments_deployments_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_deployments_deployments_get_serialize( - offset=offset, - limit=limit, - type=type, - search_query=search_query, + _param = self._get_hardware_instances_hardware_instances_v2_get_serialize( + cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2927,7 +5539,7 @@ def get_deployments_deployments_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGetDeploymentResponse", + '200': "ListHardwareInstanceResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2937,12 +5549,9 @@ def get_deployments_deployments_get_without_preload_content( return response_data.response - def _get_deployments_deployments_get_serialize( + def _get_hardware_instances_hardware_instances_v2_get_serialize( self, - offset, - limit, - type, - search_query, + cluster_id, _request_auth, _content_type, _headers, @@ -2963,21 +5572,9 @@ def _get_deployments_deployments_get_serialize( # process the path parameters # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if type is not None: - - _query_params.append(('type', type.value)) - - if search_query is not None: + if cluster_id is not None: - _query_params.append(('search_query', search_query)) + _query_params.append(('cluster_id', cluster_id)) # process the header parameters # process the form parameters @@ -2999,7 +5596,7 @@ def _get_deployments_deployments_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/deployments', + resource_path='/hardware-instances/v2', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3016,8 +5613,9 @@ def _get_deployments_deployments_get_serialize( @validate_call - def get_hardware_instances_hardware_instances_get( + def get_inference_deployment_deployments_v2_inference_deployment_id_get( self, + deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3030,10 +5628,12 @@ def get_hardware_instances_hardware_instances_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListHardwareInstanceResponse: - """Get Hardware Instances + ) -> GetInferenceV2DeploymentResponse: + """Get Inference Deployment + :param deployment_id: (required) + :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3056,7 +5656,8 @@ def get_hardware_instances_hardware_instances_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_instances_hardware_instances_get_serialize( + _param = self._get_inference_deployment_deployments_v2_inference_deployment_id_get_serialize( + deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3064,7 +5665,8 @@ def get_hardware_instances_hardware_instances_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListHardwareInstanceResponse", + '200': "GetInferenceV2DeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3078,8 +5680,9 @@ def get_hardware_instances_hardware_instances_get( @validate_call - def get_hardware_instances_hardware_instances_get_with_http_info( + def get_inference_deployment_deployments_v2_inference_deployment_id_get_with_http_info( self, + deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3092,10 +5695,12 @@ def get_hardware_instances_hardware_instances_get_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[ListHardwareInstanceResponse]: - """Get Hardware Instances + ) -> ApiResponse[GetInferenceV2DeploymentResponse]: + """Get Inference Deployment + :param deployment_id: (required) + :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3118,7 +5723,8 @@ def get_hardware_instances_hardware_instances_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_instances_hardware_instances_get_serialize( + _param = self._get_inference_deployment_deployments_v2_inference_deployment_id_get_serialize( + deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3126,7 +5732,8 @@ def get_hardware_instances_hardware_instances_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListHardwareInstanceResponse", + '200': "GetInferenceV2DeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3140,8 +5747,9 @@ def get_hardware_instances_hardware_instances_get_with_http_info( @validate_call - def get_hardware_instances_hardware_instances_get_without_preload_content( + def get_inference_deployment_deployments_v2_inference_deployment_id_get_without_preload_content( self, + deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3155,9 +5763,11 @@ def get_hardware_instances_hardware_instances_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Hardware Instances + """Get Inference Deployment + :param deployment_id: (required) + :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3180,7 +5790,8 @@ def get_hardware_instances_hardware_instances_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_instances_hardware_instances_get_serialize( + _param = self._get_inference_deployment_deployments_v2_inference_deployment_id_get_serialize( + deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3188,7 +5799,8 @@ def get_hardware_instances_hardware_instances_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListHardwareInstanceResponse", + '200': "GetInferenceV2DeploymentResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3197,8 +5809,9 @@ def get_hardware_instances_hardware_instances_get_without_preload_content( return response_data.response - def _get_hardware_instances_hardware_instances_get_serialize( + def _get_inference_deployment_deployments_v2_inference_deployment_id_get_serialize( self, + deployment_id, _request_auth, _content_type, _headers, @@ -3218,6 +5831,8 @@ def _get_hardware_instances_hardware_instances_get_serialize( _body_params: Optional[bytes] = None # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -3239,7 +5854,7 @@ def _get_hardware_instances_hardware_instances_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/hardware-instances', + resource_path='/deployments/v2/inference/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3256,9 +5871,8 @@ def _get_hardware_instances_hardware_instances_get_serialize( @validate_call - def get_inference_deployment_deployments_inference_deployment_id_get( + def get_payment_methods_payments_methods_get( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3271,12 +5885,10 @@ def get_inference_deployment_deployments_inference_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetInferenceDeploymentResponse: - """Get Inference Deployment + ) -> ListPaymentMethodResponse: + """Get Payment Methods - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3299,8 +5911,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_inference_deployment_deployments_inference_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_payment_methods_payments_methods_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3308,8 +5919,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetInferenceDeploymentResponse", - '422': "HTTPValidationError", + '200': "ListPaymentMethodResponse", } response_data = self.api_client.call_api( *_param, @@ -3323,9 +5933,8 @@ def get_inference_deployment_deployments_inference_deployment_id_get( @validate_call - def get_inference_deployment_deployments_inference_deployment_id_get_with_http_info( + def get_payment_methods_payments_methods_get_with_http_info( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3338,12 +5947,10 @@ def get_inference_deployment_deployments_inference_deployment_id_get_with_http_i _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetInferenceDeploymentResponse]: - """Get Inference Deployment + ) -> ApiResponse[ListPaymentMethodResponse]: + """Get Payment Methods - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3366,8 +5973,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get_with_http_i :return: Returns the result object. """ # noqa: E501 - _param = self._get_inference_deployment_deployments_inference_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_payment_methods_payments_methods_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3375,8 +5981,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get_with_http_i ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetInferenceDeploymentResponse", - '422': "HTTPValidationError", + '200': "ListPaymentMethodResponse", } response_data = self.api_client.call_api( *_param, @@ -3390,9 +5995,8 @@ def get_inference_deployment_deployments_inference_deployment_id_get_with_http_i @validate_call - def get_inference_deployment_deployments_inference_deployment_id_get_without_preload_content( + def get_payment_methods_payments_methods_get_without_preload_content( self, - deployment_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3406,11 +6010,9 @@ def get_inference_deployment_deployments_inference_deployment_id_get_without_pre _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Inference Deployment + """Get Payment Methods - :param deployment_id: (required) - :type deployment_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3433,8 +6035,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get_without_pre :return: Returns the result object. """ # noqa: E501 - _param = self._get_inference_deployment_deployments_inference_deployment_id_get_serialize( - deployment_id=deployment_id, + _param = self._get_payment_methods_payments_methods_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3442,8 +6043,7 @@ def get_inference_deployment_deployments_inference_deployment_id_get_without_pre ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetInferenceDeploymentResponse", - '422': "HTTPValidationError", + '200': "ListPaymentMethodResponse", } response_data = self.api_client.call_api( *_param, @@ -3452,9 +6052,8 @@ def get_inference_deployment_deployments_inference_deployment_id_get_without_pre return response_data.response - def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( + def _get_payment_methods_payments_methods_get_serialize( self, - deployment_id, _request_auth, _content_type, _headers, @@ -3474,8 +6073,6 @@ def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( _body_params: Optional[bytes] = None # process the path parameters - if deployment_id is not None: - _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -3497,7 +6094,7 @@ def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/deployments/inference/{deployment_id}', + resource_path='/payments/methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3514,8 +6111,9 @@ def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( @validate_call - def get_payment_methods_payments_methods_get( + def get_prebuilt_images_prebuilt_images_get( self, + type: Optional[DeploymentType] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3528,10 +6126,12 @@ def get_payment_methods_payments_methods_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListPaymentMethodResponse: - """Get Payment Methods + ) -> ListPrebuiltImageResponse: + """Get Prebuilt Images + :param type: + :type type: DeploymentType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3554,7 +6154,8 @@ def get_payment_methods_payments_methods_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_methods_payments_methods_get_serialize( + _param = self._get_prebuilt_images_prebuilt_images_get_serialize( + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3562,7 +6163,8 @@ def get_payment_methods_payments_methods_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentMethodResponse", + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3576,8 +6178,9 @@ def get_payment_methods_payments_methods_get( @validate_call - def get_payment_methods_payments_methods_get_with_http_info( + def get_prebuilt_images_prebuilt_images_get_with_http_info( self, + type: Optional[DeploymentType] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3590,10 +6193,12 @@ def get_payment_methods_payments_methods_get_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[ListPaymentMethodResponse]: - """Get Payment Methods + ) -> ApiResponse[ListPrebuiltImageResponse]: + """Get Prebuilt Images + :param type: + :type type: DeploymentType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3616,7 +6221,8 @@ def get_payment_methods_payments_methods_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_methods_payments_methods_get_serialize( + _param = self._get_prebuilt_images_prebuilt_images_get_serialize( + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3624,7 +6230,8 @@ def get_payment_methods_payments_methods_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentMethodResponse", + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3638,8 +6245,9 @@ def get_payment_methods_payments_methods_get_with_http_info( @validate_call - def get_payment_methods_payments_methods_get_without_preload_content( + def get_prebuilt_images_prebuilt_images_get_without_preload_content( self, + type: Optional[DeploymentType] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3653,9 +6261,11 @@ def get_payment_methods_payments_methods_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Payment Methods + """Get Prebuilt Images + :param type: + :type type: DeploymentType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3678,7 +6288,8 @@ def get_payment_methods_payments_methods_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_methods_payments_methods_get_serialize( + _param = self._get_prebuilt_images_prebuilt_images_get_serialize( + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3686,7 +6297,8 @@ def get_payment_methods_payments_methods_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentMethodResponse", + '200': "ListPrebuiltImageResponse", + '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -3695,8 +6307,9 @@ def get_payment_methods_payments_methods_get_without_preload_content( return response_data.response - def _get_payment_methods_payments_methods_get_serialize( + def _get_prebuilt_images_prebuilt_images_get_serialize( self, + type, _request_auth, _content_type, _headers, @@ -3717,6 +6330,10 @@ def _get_payment_methods_payments_methods_get_serialize( # process the path parameters # process the query parameters + if type is not None: + + _query_params.append(('type', type.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -3737,7 +6354,7 @@ def _get_payment_methods_payments_methods_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/methods', + resource_path='/prebuilt-images', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3754,9 +6371,10 @@ def _get_payment_methods_payments_methods_get_serialize( @validate_call - def get_prebuilt_images_prebuilt_images_get( + def get_usage_daily_bills_get( self, - type: Optional[DeploymentType] = None, + start_date: date, + end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3769,12 +6387,14 @@ def get_prebuilt_images_prebuilt_images_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListPrebuiltImageResponse: - """Get Prebuilt Images + ) -> ListDailyBillResponse: + """Get Usage - :param type: - :type type: DeploymentType + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3797,8 +6417,9 @@ def get_prebuilt_images_prebuilt_images_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_prebuilt_images_prebuilt_images_get_serialize( - type=type, + _param = self._get_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3806,7 +6427,7 @@ def get_prebuilt_images_prebuilt_images_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPrebuiltImageResponse", + '200': "ListDailyBillResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3821,9 +6442,10 @@ def get_prebuilt_images_prebuilt_images_get( @validate_call - def get_prebuilt_images_prebuilt_images_get_with_http_info( + def get_usage_daily_bills_get_with_http_info( self, - type: Optional[DeploymentType] = None, + start_date: date, + end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3836,12 +6458,14 @@ def get_prebuilt_images_prebuilt_images_get_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[ListPrebuiltImageResponse]: - """Get Prebuilt Images + ) -> ApiResponse[ListDailyBillResponse]: + """Get Usage - :param type: - :type type: DeploymentType + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3864,8 +6488,9 @@ def get_prebuilt_images_prebuilt_images_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_prebuilt_images_prebuilt_images_get_serialize( - type=type, + _param = self._get_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3873,7 +6498,7 @@ def get_prebuilt_images_prebuilt_images_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPrebuiltImageResponse", + '200': "ListDailyBillResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3888,9 +6513,10 @@ def get_prebuilt_images_prebuilt_images_get_with_http_info( @validate_call - def get_prebuilt_images_prebuilt_images_get_without_preload_content( + def get_usage_daily_bills_get_without_preload_content( self, - type: Optional[DeploymentType] = None, + start_date: date, + end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3904,11 +6530,13 @@ def get_prebuilt_images_prebuilt_images_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Prebuilt Images + """Get Usage - :param type: - :type type: DeploymentType + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3931,8 +6559,9 @@ def get_prebuilt_images_prebuilt_images_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_prebuilt_images_prebuilt_images_get_serialize( - type=type, + _param = self._get_usage_daily_bills_get_serialize( + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3940,7 +6569,7 @@ def get_prebuilt_images_prebuilt_images_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPrebuiltImageResponse", + '200': "ListDailyBillResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3950,9 +6579,10 @@ def get_prebuilt_images_prebuilt_images_get_without_preload_content( return response_data.response - def _get_prebuilt_images_prebuilt_images_get_serialize( + def _get_usage_daily_bills_get_serialize( self, - type, + start_date, + end_date, _request_auth, _content_type, _headers, @@ -3973,9 +6603,31 @@ def _get_prebuilt_images_prebuilt_images_get_serialize( # process the path parameters # process the query parameters - if type is not None: + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'start_date', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('start_date', start_date)) - _query_params.append(('type', type.value)) + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'end_date', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('end_date', end_date)) # process the header parameters # process the form parameters @@ -3997,7 +6649,7 @@ def _get_prebuilt_images_prebuilt_images_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/prebuilt-images', + resource_path='/daily_bills', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4014,9 +6666,12 @@ def _get_prebuilt_images_prebuilt_images_get_serialize( @validate_call - def get_training_deployment_deployments_training_deployment_id_get( + def get_usage_deployments_usage_deployment_id_get( self, deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4029,12 +6684,18 @@ def get_training_deployment_deployments_training_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetTrainingDeploymentResponse: - """Get Training Deployment + ) -> GetDeploymentUsageResponse: + """Get Usage :param deployment_id: (required) :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4057,8 +6718,11 @@ def get_training_deployment_deployments_training_deployment_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_training_deployment_deployments_training_deployment_id_get_serialize( + _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4066,7 +6730,7 @@ def get_training_deployment_deployments_training_deployment_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTrainingDeploymentResponse", + '200': "GetDeploymentUsageResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4081,9 +6745,12 @@ def get_training_deployment_deployments_training_deployment_id_get( @validate_call - def get_training_deployment_deployments_training_deployment_id_get_with_http_info( + def get_usage_deployments_usage_deployment_id_get_with_http_info( self, deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4096,12 +6763,18 @@ def get_training_deployment_deployments_training_deployment_id_get_with_http_inf _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetTrainingDeploymentResponse]: - """Get Training Deployment + ) -> ApiResponse[GetDeploymentUsageResponse]: + """Get Usage :param deployment_id: (required) :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4124,8 +6797,11 @@ def get_training_deployment_deployments_training_deployment_id_get_with_http_inf :return: Returns the result object. """ # noqa: E501 - _param = self._get_training_deployment_deployments_training_deployment_id_get_serialize( + _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4133,7 +6809,7 @@ def get_training_deployment_deployments_training_deployment_id_get_with_http_inf ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTrainingDeploymentResponse", + '200': "GetDeploymentUsageResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4148,9 +6824,12 @@ def get_training_deployment_deployments_training_deployment_id_get_with_http_inf @validate_call - def get_training_deployment_deployments_training_deployment_id_get_without_preload_content( + def get_usage_deployments_usage_deployment_id_get_without_preload_content( self, deployment_id: StrictInt, + metric: Metric, + duration: StrictInt, + end_time: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4164,11 +6843,17 @@ def get_training_deployment_deployments_training_deployment_id_get_without_prelo _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Training Deployment + """Get Usage :param deployment_id: (required) :type deployment_id: int + :param metric: (required) + :type metric: Metric + :param duration: (required) + :type duration: int + :param end_time: + :type end_time: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4191,8 +6876,11 @@ def get_training_deployment_deployments_training_deployment_id_get_without_prelo :return: Returns the result object. """ # noqa: E501 - _param = self._get_training_deployment_deployments_training_deployment_id_get_serialize( + _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, + metric=metric, + duration=duration, + end_time=end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4200,7 +6888,7 @@ def get_training_deployment_deployments_training_deployment_id_get_without_prelo ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTrainingDeploymentResponse", + '200': "GetDeploymentUsageResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4210,9 +6898,12 @@ def get_training_deployment_deployments_training_deployment_id_get_without_prelo return response_data.response - def _get_training_deployment_deployments_training_deployment_id_get_serialize( + def _get_usage_deployments_usage_deployment_id_get_serialize( self, deployment_id, + metric, + duration, + end_time, _request_auth, _content_type, _headers, @@ -4235,6 +6926,18 @@ def _get_training_deployment_deployments_training_deployment_id_get_serialize( if deployment_id is not None: _path_params['deployment_id'] = deployment_id # process the query parameters + if metric is not None: + + _query_params.append(('metric', metric.value)) + + if duration is not None: + + _query_params.append(('duration', duration)) + + if end_time is not None: + + _query_params.append(('end_time', end_time)) + # process the header parameters # process the form parameters # process the body parameter @@ -4255,7 +6958,7 @@ def _get_training_deployment_deployments_training_deployment_id_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/deployments/training/{deployment_id}', + resource_path='/deployments/usage/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4272,7 +6975,7 @@ def _get_training_deployment_deployments_training_deployment_id_get_serialize( @validate_call - def update_deployment_status_deployments_status_deployment_id_put( + def update_deployment_status_deployments_v2_status_deployment_id_put( self, deployment_id: StrictInt, deployment_status_request: DeploymentStatusRequest, @@ -4288,7 +6991,7 @@ def update_deployment_status_deployments_status_deployment_id_put( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeploymentStatusResponse: + ) -> DeploymentStatusResponseV2: """Update Deployment Status @@ -4318,7 +7021,7 @@ def update_deployment_status_deployments_status_deployment_id_put( :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + _param = self._update_deployment_status_deployments_v2_status_deployment_id_put_serialize( deployment_id=deployment_id, deployment_status_request=deployment_status_request, _request_auth=_request_auth, @@ -4328,7 +7031,7 @@ def update_deployment_status_deployments_status_deployment_id_put( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "DeploymentStatusResponseV2", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4343,7 +7046,7 @@ def update_deployment_status_deployments_status_deployment_id_put( @validate_call - def update_deployment_status_deployments_status_deployment_id_put_with_http_info( + def update_deployment_status_deployments_v2_status_deployment_id_put_with_http_info( self, deployment_id: StrictInt, deployment_status_request: DeploymentStatusRequest, @@ -4359,7 +7062,7 @@ def update_deployment_status_deployments_status_deployment_id_put_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[DeploymentStatusResponse]: + ) -> ApiResponse[DeploymentStatusResponseV2]: """Update Deployment Status @@ -4389,7 +7092,7 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + _param = self._update_deployment_status_deployments_v2_status_deployment_id_put_serialize( deployment_id=deployment_id, deployment_status_request=deployment_status_request, _request_auth=_request_auth, @@ -4399,7 +7102,7 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "DeploymentStatusResponseV2", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4414,7 +7117,7 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info @validate_call - def update_deployment_status_deployments_status_deployment_id_put_without_preload_content( + def update_deployment_status_deployments_v2_status_deployment_id_put_without_preload_content( self, deployment_id: StrictInt, deployment_status_request: DeploymentStatusRequest, @@ -4460,7 +7163,7 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + _param = self._update_deployment_status_deployments_v2_status_deployment_id_put_serialize( deployment_id=deployment_id, deployment_status_request=deployment_status_request, _request_auth=_request_auth, @@ -4470,7 +7173,7 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "DeploymentStatusResponseV2", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4480,7 +7183,7 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa return response_data.response - def _update_deployment_status_deployments_status_deployment_id_put_serialize( + def _update_deployment_status_deployments_v2_status_deployment_id_put_serialize( self, deployment_id, deployment_status_request, @@ -4541,7 +7244,7 @@ def _update_deployment_status_deployments_status_deployment_id_put_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/deployments/status/{deployment_id}', + resource_path='/deployments/v2/status/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/platform_api_client/api_client.py b/platform_api_python_client/api_client.py similarity index 98% rename from platform_api_client/api_client.py rename to platform_api_python_client/api_client.py index 28e4ed3..540c750 100644 --- a/platform_api_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -25,11 +25,11 @@ from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr -from platform_api_client.configuration import Configuration -from platform_api_client.api_response import ApiResponse, T as ApiResponseT -import platform_api_client.models -from platform_api_client import rest -from platform_api_client.exceptions import ( +from platform_api_python_client.configuration import Configuration +from platform_api_python_client.api_response import ApiResponse, T as ApiResponseT +import platform_api_python_client.models +from platform_api_python_client import rest +from platform_api_python_client.exceptions import ( ApiValueError, ApiException, BadRequestException, @@ -433,7 +433,7 @@ def __deserialize(self, data, klass): if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(platform_api_client.models, klass) + klass = getattr(platform_api_python_client.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) diff --git a/platform_api_client/api_response.py b/platform_api_python_client/api_response.py similarity index 100% rename from platform_api_client/api_response.py rename to platform_api_python_client/api_response.py diff --git a/platform_api_client/configuration.py b/platform_api_python_client/configuration.py similarity index 99% rename from platform_api_client/configuration.py rename to platform_api_python_client/configuration.py index 0f750a0..869ce9d 100644 --- a/platform_api_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -110,7 +110,7 @@ def __init__(self, host=None, self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("platform_api_client") + self.logger["package_logger"] = logging.getLogger("platform_api_python_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format diff --git a/platform_api_client/exceptions.py b/platform_api_python_client/exceptions.py similarity index 100% rename from platform_api_client/exceptions.py rename to platform_api_python_client/exceptions.py diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py new file mode 100644 index 0000000..30952fa --- /dev/null +++ b/platform_api_python_client/models/__init__.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +# flake8: noqa +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from platform_api_python_client.models.api_key_request import APIKeyRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest +from platform_api_python_client.models.c_serve_recipe_input import CServeRecipeInput +from platform_api_python_client.models.c_serve_recipe_output import CServeRecipeOutput +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from platform_api_python_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest +from platform_api_python_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from platform_api_python_client.models.feedback_request import FeedbackRequest +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse +from platform_api_python_client.models.get_deployment_v2_response import GetDeploymentV2Response +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse +from platform_api_python_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.health_status import HealthStatus +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/models/add_hardware_request.py b/platform_api_python_client/models/add_hardware_request.py new file mode 100644 index 0000000..c0a52b3 --- /dev/null +++ b/platform_api_python_client/models/add_hardware_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AddHardwareRequest(BaseModel): + """ + AddHardwareRequest + """ # noqa: E501 + message: StrictStr + __properties: ClassVar[List[str]] = ["message"] + + 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 AddHardwareRequest 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 AddHardwareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + return _obj + + diff --git a/platform_api_python_client/models/api_key_request.py b/platform_api_python_client/models/api_key_request.py new file mode 100644 index 0000000..50d4f3f --- /dev/null +++ b/platform_api_python_client/models/api_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class APIKeyRequest(BaseModel): + """ + APIKeyRequest + """ # noqa: E501 + name: StrictStr + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of APIKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of APIKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/platform_api_python_client/models/api_key_response.py b/platform_api_python_client/models/api_key_response.py new file mode 100644 index 0000000..09f8f58 --- /dev/null +++ b/platform_api_python_client/models/api_key_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class APIKeyResponse(BaseModel): + """ + APIKeyResponse + """ # noqa: E501 + name: StrictStr + id: StrictStr + created_at: datetime + __properties: ClassVar[List[str]] = ["name", "id", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of APIKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of APIKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "id": obj.get("id"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/platform_api_python_client/models/c_serve_recipe_input.py b/platform_api_python_client/models/c_serve_recipe_input.py new file mode 100644 index 0000000..c6bc41d --- /dev/null +++ b/platform_api_python_client/models/c_serve_recipe_input.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipeInput(BaseModel): + """ + Base class for deployment planner + """ # noqa: E501 + model: StrictStr + is_embedding_model: Optional[StrictBool] = False + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + block_size: Optional[StrictInt] = 32 + swap_space: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0 + gpu_mem_util: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = 0.95 + max_num_seqs: Optional[StrictInt] = 256 + use_prefix_caching: Optional[StrictBool] = None + offloading_num: Optional[StrictInt] = 0 + use_flashinfer: Optional[StrictBool] = False + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] = None + dtype: Optional[StrictStr] = 'auto' + tokenizer: Optional[StrictStr] = None + spec_proposer: Optional[StrictStr] = None + spec_draft_model: Optional[StrictStr] = None + spec_tokens: Optional[StrictInt] = None + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + seed: Optional[StrictInt] = 0 + __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "use_prefix_caching", "offloading_num", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] + + 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 CServeRecipeInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if use_prefix_caching (nullable) is None + # and model_fields_set contains the field + if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: + _dict['use_prefix_caching'] = None + + # set to None if max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # set to None if tokenizer (nullable) is None + # and model_fields_set contains the field + if self.tokenizer is None and "tokenizer" in self.model_fields_set: + _dict['tokenizer'] = None + + # set to None if spec_proposer (nullable) is None + # and model_fields_set contains the field + if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: + _dict['spec_proposer'] = None + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipeInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "use_prefix_caching": obj.get("use_prefix_caching"), + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "max_model_len": obj.get("max_model_len"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "tokenizer": obj.get("tokenizer"), + "spec_proposer": obj.get("spec_proposer"), + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "seed": obj.get("seed") if obj.get("seed") is not None else 0 + }) + return _obj + + diff --git a/platform_api_python_client/models/c_serve_recipe_output.py b/platform_api_python_client/models/c_serve_recipe_output.py new file mode 100644 index 0000000..16cedc2 --- /dev/null +++ b/platform_api_python_client/models/c_serve_recipe_output.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipeOutput(BaseModel): + """ + Base class for deployment planner + """ # noqa: E501 + model: StrictStr + is_embedding_model: StrictBool + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + block_size: StrictInt + swap_space: Annotated[int, Field(strict=True, ge=0)] + gpu_mem_util: Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + max_num_seqs: StrictInt + use_prefix_caching: Optional[StrictBool] + offloading_num: StrictInt + use_flashinfer: StrictBool + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] + dtype: StrictStr + tokenizer: Optional[StrictStr] + spec_proposer: Optional[StrictStr] + spec_draft_model: Optional[StrictStr] + spec_tokens: Optional[StrictInt] + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] + seed: StrictInt + __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "use_prefix_caching", "offloading_num", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] + + 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 CServeRecipeOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if use_prefix_caching (nullable) is None + # and model_fields_set contains the field + if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: + _dict['use_prefix_caching'] = None + + # set to None if max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # set to None if tokenizer (nullable) is None + # and model_fields_set contains the field + if self.tokenizer is None and "tokenizer" in self.model_fields_set: + _dict['tokenizer'] = None + + # set to None if spec_proposer (nullable) is None + # and model_fields_set contains the field + if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: + _dict['spec_proposer'] = None + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipeOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "use_prefix_caching": obj.get("use_prefix_caching"), + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "max_model_len": obj.get("max_model_len"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "tokenizer": obj.get("tokenizer"), + "spec_proposer": obj.get("spec_proposer"), + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "seed": obj.get("seed") if obj.get("seed") is not None else 0 + }) + return _obj + + diff --git a/platform_api_python_client/models/c_serve_recipe_perf.py b/platform_api_python_client/models/c_serve_recipe_perf.py new file mode 100644 index 0000000..60eeab0 --- /dev/null +++ b/platform_api_python_client/models/c_serve_recipe_perf.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from platform_api_python_client.models.c_serve_recipe_output import CServeRecipeOutput +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipePerf(BaseModel): + """ + CServeRecipePerf + """ # noqa: E501 + recipe: CServeRecipeOutput + hardware_instance_id: StrictInt + output_tp: List[Annotated[List[StrictStr], Field(min_length=2, max_length=2)]] + mean_ttft: List[Annotated[List[StrictStr], Field(min_length=2, max_length=2)]] + __properties: ClassVar[List[str]] = ["recipe", "hardware_instance_id", "output_tp", "mean_ttft"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CServeRecipePerf from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipePerf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "recipe": CServeRecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hardware_instance_id": obj.get("hardware_instance_id"), + "output_tp": obj.get("output_tp"), + "mean_ttft": obj.get("mean_ttft") + }) + return _obj + + diff --git a/platform_api_python_client/models/c_serve_recipe_response.py b/platform_api_python_client/models/c_serve_recipe_response.py new file mode 100644 index 0000000..64882ce --- /dev/null +++ b/platform_api_python_client/models/c_serve_recipe_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf +from typing import Optional, Set +from typing_extensions import Self + +class CServeRecipeResponse(BaseModel): + """ + CServeRecipeResponse + """ # noqa: E501 + model: StrictStr + cluster_id: StrictInt + fastest: CServeRecipePerf + cheapest: CServeRecipePerf + best_value: CServeRecipePerf + __properties: ClassVar[List[str]] = ["model", "cluster_id", "fastest", "cheapest", "best_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CServeRecipeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of fastest + if self.fastest: + _dict['fastest'] = self.fastest.to_dict() + # override the default output from pydantic by calling `to_dict()` of cheapest + if self.cheapest: + _dict['cheapest'] = self.cheapest.to_dict() + # override the default output from pydantic by calling `to_dict()` of best_value + if self.best_value: + _dict['best_value'] = self.best_value.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CServeRecipeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "cluster_id": obj.get("cluster_id"), + "fastest": CServeRecipePerf.from_dict(obj["fastest"]) if obj.get("fastest") is not None else None, + "cheapest": CServeRecipePerf.from_dict(obj["cheapest"]) if obj.get("cheapest") is not None else None, + "best_value": CServeRecipePerf.from_dict(obj["best_value"]) if obj.get("best_value") is not None else None + }) + return _obj + + diff --git a/platform_api_client/models/client_secret_response.py b/platform_api_python_client/models/client_secret_response.py similarity index 100% rename from platform_api_client/models/client_secret_response.py rename to platform_api_python_client/models/client_secret_response.py diff --git a/platform_api_client/models/get_training_deployment_response.py b/platform_api_python_client/models/create_c_serve_deployment_request.py similarity index 59% rename from platform_api_client/models/get_training_deployment_response.py rename to platform_api_python_client/models/create_c_serve_deployment_request.py index 1241926..b33cf14 100644 --- a/platform_api_client/models/get_training_deployment_response.py +++ b/platform_api_python_client/models/create_c_serve_deployment_request.py @@ -17,28 +17,26 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.c_serve_recipe_input import CServeRecipeInput from typing import Optional, Set from typing_extensions import Self -class GetTrainingDeploymentResponse(BaseModel): +class CreateCServeDeploymentRequest(BaseModel): """ - GetTrainingDeploymentResponse + CreateCServeDeploymentRequest """ # noqa: E501 - id: StrictInt name: StrictStr - image_url: StrictStr - type: DeploymentType - status: DeploymentStatus - created_at: datetime + cluster_id: StrictInt hardware_instance_id: StrictInt - endpoint_url: Optional[StrictStr] - env_vars: Optional[Dict[str, StrictStr]] - __properties: ClassVar[List[str]] = ["id", "name", "image_url", "type", "status", "created_at", "hardware_instance_id", "endpoint_url", "env_vars"] + recipe: CServeRecipeInput + hf_token: StrictStr + endpoint_certificate_authority: Optional[StrictStr] = None + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency"] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +56,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetTrainingDeploymentResponse from a JSON string""" + """Create an instance of CreateCServeDeploymentRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,21 +77,24 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if endpoint_url (nullable) is None + # override the default output from pydantic by calling `to_dict()` of recipe + if self.recipe: + _dict['recipe'] = self.recipe.to_dict() + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field - if self.endpoint_url is None and "endpoint_url" in self.model_fields_set: - _dict['endpoint_url'] = None + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None - # set to None if env_vars (nullable) is None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field - if self.env_vars is None and "env_vars" in self.model_fields_set: - _dict['env_vars'] = None + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetTrainingDeploymentResponse from a dict""" + """Create an instance of CreateCServeDeploymentRequest from a dict""" if obj is None: return None @@ -101,15 +102,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), "name": obj.get("name"), - "image_url": obj.get("image_url"), - "type": obj.get("type"), - "status": obj.get("status"), - "created_at": obj.get("created_at"), + "cluster_id": obj.get("cluster_id"), "hardware_instance_id": obj.get("hardware_instance_id"), - "endpoint_url": obj.get("endpoint_url"), - "env_vars": obj.get("env_vars") + "recipe": CServeRecipeInput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "hf_token": obj.get("hf_token"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency") }) return _obj diff --git a/platform_api_client/models/create_training_deployment_response.py b/platform_api_python_client/models/create_c_serve_deployment_response.py similarity index 90% rename from platform_api_client/models/create_training_deployment_response.py rename to platform_api_python_client/models/create_c_serve_deployment_response.py index 7178112..f33fb54 100644 --- a/platform_api_client/models/create_training_deployment_response.py +++ b/platform_api_python_client/models/create_c_serve_deployment_response.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class CreateTrainingDeploymentResponse(BaseModel): +class CreateCServeDeploymentResponse(BaseModel): """ - CreateTrainingDeploymentResponse + CreateCServeDeploymentResponse """ # noqa: E501 id: StrictInt created_at: datetime @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTrainingDeploymentResponse from a JSON string""" + """Create an instance of CreateCServeDeploymentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTrainingDeploymentResponse from a dict""" + """Create an instance of CreateCServeDeploymentResponse from a dict""" if obj is None: return None diff --git a/platform_api_client/models/create_compute_deployment_response.py b/platform_api_python_client/models/create_compute_deployment_response.py similarity index 100% rename from platform_api_client/models/create_compute_deployment_response.py rename to platform_api_python_client/models/create_compute_deployment_response.py diff --git a/platform_api_client/models/create_compute_deployment_request.py b/platform_api_python_client/models/create_compute_deployment_v2_request.py similarity index 69% rename from platform_api_client/models/create_compute_deployment_request.py rename to platform_api_python_client/models/create_compute_deployment_v2_request.py index ed9df80..7e5282e 100644 --- a/platform_api_client/models/create_compute_deployment_request.py +++ b/platform_api_python_client/models/create_compute_deployment_v2_request.py @@ -22,17 +22,17 @@ from typing import Optional, Set from typing_extensions import Self -class CreateComputeDeploymentRequest(BaseModel): +class CreateComputeDeploymentV2Request(BaseModel): """ - CreateComputeDeploymentRequest + CreateComputeDeploymentV2Request """ # noqa: E501 name: StrictStr - image_url: StrictStr + cluster_id: StrictInt hardware_instance_id: StrictInt - ssh_key: Optional[StrictStr] = None - username: StrictStr - password: StrictStr - __properties: ClassVar[List[str]] = ["name", "image_url", "hardware_instance_id", "ssh_key", "username", "password"] + image_url: StrictStr + ssh_public_key: Optional[StrictStr] = None + ssh_password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "ssh_public_key", "ssh_password"] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateComputeDeploymentRequest from a JSON string""" + """Create an instance of CreateComputeDeploymentV2Request from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,16 +73,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if ssh_key (nullable) is None + # set to None if ssh_public_key (nullable) is None + # and model_fields_set contains the field + if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set: + _dict['ssh_public_key'] = None + + # set to None if ssh_password (nullable) is None # and model_fields_set contains the field - if self.ssh_key is None and "ssh_key" in self.model_fields_set: - _dict['ssh_key'] = None + if self.ssh_password is None and "ssh_password" in self.model_fields_set: + _dict['ssh_password'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateComputeDeploymentRequest from a dict""" + """Create an instance of CreateComputeDeploymentV2Request from a dict""" if obj is None: return None @@ -91,11 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "image_url": obj.get("image_url"), + "cluster_id": obj.get("cluster_id"), "hardware_instance_id": obj.get("hardware_instance_id"), - "ssh_key": obj.get("ssh_key"), - "username": obj.get("username"), - "password": obj.get("password") + "image_url": obj.get("image_url"), + "ssh_public_key": obj.get("ssh_public_key"), + "ssh_password": obj.get("ssh_password") }) return _obj diff --git a/platform_api_client/models/create_inference_deployment_response.py b/platform_api_python_client/models/create_inference_deployment_response.py similarity index 100% rename from platform_api_client/models/create_inference_deployment_response.py rename to platform_api_python_client/models/create_inference_deployment_response.py diff --git a/platform_api_client/models/create_inference_deployment_request.py b/platform_api_python_client/models/create_inference_deployment_v2_request.py similarity index 81% rename from platform_api_client/models/create_inference_deployment_request.py rename to platform_api_python_client/models/create_inference_deployment_v2_request.py index 7bd5d3b..1d9d1e7 100644 --- a/platform_api_client/models/create_inference_deployment_request.py +++ b/platform_api_python_client/models/create_inference_deployment_v2_request.py @@ -22,23 +22,24 @@ from typing import Optional, Set from typing_extensions import Self -class CreateInferenceDeploymentRequest(BaseModel): +class CreateInferenceDeploymentV2Request(BaseModel): """ - CreateInferenceDeploymentRequest + CreateInferenceDeploymentV2Request """ # noqa: E501 name: StrictStr - image_url: StrictStr + cluster_id: StrictInt hardware_instance_id: StrictInt + image_url: StrictStr port: StrictInt - min_replicas: StrictInt - max_replicas: StrictInt - timeout: Optional[StrictInt] = None + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] = None healthcheck: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None command: Optional[List[StrictStr]] = None command_args: Optional[List[StrictStr]] = None endpoint_certificate_authority: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name", "image_url", "hardware_instance_id", "port", "min_replicas", "max_replicas", "timeout", "healthcheck", "env_vars", "command", "command_args", "endpoint_certificate_authority"] + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "command_args", "endpoint_certificate_authority"] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateInferenceDeploymentRequest from a JSON string""" + """Create an instance of CreateInferenceDeploymentV2Request from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,10 +80,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if timeout (nullable) is None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field - if self.timeout is None and "timeout" in self.model_fields_set: - _dict['timeout'] = None + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field @@ -113,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateInferenceDeploymentRequest from a dict""" + """Create an instance of CreateInferenceDeploymentV2Request from a dict""" if obj is None: return None @@ -122,14 +123,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "image_url": obj.get("image_url"), + "cluster_id": obj.get("cluster_id"), "hardware_instance_id": obj.get("hardware_instance_id"), + "image_url": obj.get("image_url"), "port": obj.get("port"), - "min_replicas": obj.get("min_replicas"), - "max_replicas": obj.get("max_replicas"), - "timeout": obj.get("timeout"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), "healthcheck": obj.get("healthcheck"), - "env_vars": obj.get("env_vars"), "command": obj.get("command"), "command_args": obj.get("command_args"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority") diff --git a/platform_api_client/models/create_payment_request.py b/platform_api_python_client/models/create_payment_request.py similarity index 100% rename from platform_api_client/models/create_payment_request.py rename to platform_api_python_client/models/create_payment_request.py diff --git a/platform_api_client/models/credits_response.py b/platform_api_python_client/models/credits_response.py similarity index 100% rename from platform_api_client/models/credits_response.py rename to platform_api_python_client/models/credits_response.py diff --git a/platform_api_python_client/models/daily_bill_response.py b/platform_api_python_client/models/daily_bill_response.py new file mode 100644 index 0000000..9850305 --- /dev/null +++ b/platform_api_python_client/models/daily_bill_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DailyBillResponse(BaseModel): + """ + DailyBillResponse + """ # noqa: E501 + var_date: date = Field(alias="date") + credits: StrictInt + __properties: ClassVar[List[str]] = ["date", "credits"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DailyBillResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DailyBillResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "credits": obj.get("credits") + }) + return _obj + + diff --git a/platform_api_client/models/deployment_status.py b/platform_api_python_client/models/deployment_status.py similarity index 100% rename from platform_api_client/models/deployment_status.py rename to platform_api_python_client/models/deployment_status.py diff --git a/platform_api_client/models/deployment_status_request.py b/platform_api_python_client/models/deployment_status_request.py similarity index 96% rename from platform_api_client/models/deployment_status_request.py rename to platform_api_python_client/models/deployment_status_request.py index 8333cd9..c93eeb2 100644 --- a/platform_api_client/models/deployment_status_request.py +++ b/platform_api_python_client/models/deployment_status_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from platform_api_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status import DeploymentStatus from typing import Optional, Set from typing_extensions import Self diff --git a/platform_api_client/models/deployment_status_response.py b/platform_api_python_client/models/deployment_status_response_v2.py similarity index 87% rename from platform_api_client/models/deployment_status_response.py rename to platform_api_python_client/models/deployment_status_response_v2.py index 95cad56..4bfdd65 100644 --- a/platform_api_client/models/deployment_status_response.py +++ b/platform_api_python_client/models/deployment_status_response_v2.py @@ -19,20 +19,20 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_type import DeploymentType -from platform_api_client.models.endpoint_ready_state import EndpointReadyState +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.health_status import HealthStatus from typing import Optional, Set from typing_extensions import Self -class DeploymentStatusResponse(BaseModel): +class DeploymentStatusResponseV2(BaseModel): """ - DeploymentStatusResponse + DeploymentStatusResponseV2 """ # noqa: E501 id: StrictInt type: DeploymentType status: DeploymentStatus - service_status: Optional[EndpointReadyState] + service_status: Optional[HealthStatus] error_message: Optional[StrictStr] endpoint_url: Optional[StrictStr] __properties: ClassVar[List[str]] = ["id", "type", "status", "service_status", "error_message", "endpoint_url"] @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeploymentStatusResponse from a JSON string""" + """Create an instance of DeploymentStatusResponseV2 from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -95,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeploymentStatusResponse from a dict""" + """Create an instance of DeploymentStatusResponseV2 from a dict""" if obj is None: return None diff --git a/platform_api_client/models/deployment_type.py b/platform_api_python_client/models/deployment_type.py similarity index 87% rename from platform_api_client/models/deployment_type.py rename to platform_api_python_client/models/deployment_type.py index 230ce4b..4753e95 100644 --- a/platform_api_client/models/deployment_type.py +++ b/platform_api_python_client/models/deployment_type.py @@ -30,6 +30,10 @@ class DeploymentType(str, Enum): TRAINING = 'training' COMPUTE = 'compute' COMPILATION = 'compilation' + INFERENCE_V2 = 'inference_v2' + COMPUTE_V2 = 'compute_v2' + CSERVE = 'cserve' + DEPLOYMENT = 'deployment' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/platform_api_python_client/models/deployment_usage_value.py b/platform_api_python_client/models/deployment_usage_value.py new file mode 100644 index 0000000..b8ddd2a --- /dev/null +++ b/platform_api_python_client/models/deployment_usage_value.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DeploymentUsageValue(BaseModel): + """ + DeploymentUsageValue + """ # noqa: E501 + timestamp: StrictInt + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["timestamp", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeploymentUsageValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeploymentUsageValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "value": obj.get("value") + }) + return _obj + + diff --git a/platform_api_python_client/models/feedback_request.py b/platform_api_python_client/models/feedback_request.py new file mode 100644 index 0000000..c14962a --- /dev/null +++ b/platform_api_python_client/models/feedback_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FeedbackRequest(BaseModel): + """ + FeedbackRequest + """ # noqa: E501 + message: StrictStr + rating: StrictInt + follow_up: StrictBool + __properties: ClassVar[List[str]] = ["message", "rating", "follow_up"] + + 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 FeedbackRequest 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 FeedbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "rating": obj.get("rating"), + "follow_up": obj.get("follow_up") + }) + return _obj + + diff --git a/platform_api_python_client/models/get_c_serve_deployment_response.py b/platform_api_python_client/models/get_c_serve_deployment_response.py new file mode 100644 index 0000000..7468a48 --- /dev/null +++ b/platform_api_python_client/models/get_c_serve_deployment_response.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from typing import Optional, Set +from typing_extensions import Self + +class GetCServeDeploymentResponse(BaseModel): + """ + GetCServeDeploymentResponse + """ # noqa: E501 + model: StrictStr + is_embedding_model: StrictBool + tensor_parallel_size: StrictInt + pipeline_parallel_size: StrictInt + block_size: StrictInt + swap_space: Annotated[int, Field(strict=True, ge=0)] + gpu_mem_util: Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + max_num_seqs: StrictInt + use_prefix_caching: Optional[StrictBool] + offloading_num: StrictInt + use_flashinfer: StrictBool + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] + dtype: StrictStr + tokenizer: Optional[StrictStr] + spec_proposer: Optional[StrictStr] + spec_draft_model: Optional[StrictStr] + spec_tokens: Optional[StrictInt] + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] + seed: StrictInt + cluster_id: StrictInt + id: StrictInt + name: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] + type: DeploymentType + status: DeploymentStatus + created_at: datetime + hardware_instance_id: StrictInt + min_scale: StrictInt + max_scale: StrictInt + endpoint_certificate_authority: Optional[StrictStr] + concurrency: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "use_prefix_caching", "offloading_num", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetCServeDeploymentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if use_prefix_caching (nullable) is None + # and model_fields_set contains the field + if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: + _dict['use_prefix_caching'] = None + + # set to None if max_model_len (nullable) is None + # and model_fields_set contains the field + if self.max_model_len is None and "max_model_len" in self.model_fields_set: + _dict['max_model_len'] = None + + # set to None if tokenizer (nullable) is None + # and model_fields_set contains the field + if self.tokenizer is None and "tokenizer" in self.model_fields_set: + _dict['tokenizer'] = None + + # set to None if spec_proposer (nullable) is None + # and model_fields_set contains the field + if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: + _dict['spec_proposer'] = None + + # set to None if spec_draft_model (nullable) is None + # and model_fields_set contains the field + if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: + _dict['spec_draft_model'] = None + + # set to None if spec_tokens (nullable) is None + # and model_fields_set contains the field + if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: + _dict['spec_tokens'] = None + + # set to None if spec_prompt_lookup_min (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: + _dict['spec_prompt_lookup_min'] = None + + # set to None if spec_prompt_lookup_max (nullable) is None + # and model_fields_set contains the field + if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: + _dict['spec_prompt_lookup_max'] = None + + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if endpoint_certificate_authority (nullable) is None + # and model_fields_set contains the field + if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: + _dict['endpoint_certificate_authority'] = None + + # set to None if concurrency (nullable) is None + # and model_fields_set contains the field + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetCServeDeploymentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, + "tensor_parallel_size": obj.get("tensor_parallel_size"), + "pipeline_parallel_size": obj.get("pipeline_parallel_size"), + "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, + "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, + "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, + "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, + "use_prefix_caching": obj.get("use_prefix_caching"), + "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, + "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, + "max_model_len": obj.get("max_model_len"), + "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', + "tokenizer": obj.get("tokenizer"), + "spec_proposer": obj.get("spec_proposer"), + "spec_draft_model": obj.get("spec_draft_model"), + "spec_tokens": obj.get("spec_tokens"), + "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), + "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), + "seed": obj.get("seed") if obj.get("seed") is not None else 0, + "cluster_id": obj.get("cluster_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), + "image_url": obj.get("image_url"), + "type": obj.get("type"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "hardware_instance_id": obj.get("hardware_instance_id"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "concurrency": obj.get("concurrency") + }) + return _obj + + diff --git a/platform_api_client/models/create_training_deployment_request.py b/platform_api_python_client/models/get_cluster_response.py similarity index 79% rename from platform_api_client/models/create_training_deployment_request.py rename to platform_api_python_client/models/get_cluster_response.py index d57ab6e..778c6f2 100644 --- a/platform_api_client/models/create_training_deployment_request.py +++ b/platform_api_python_client/models/get_cluster_response.py @@ -22,14 +22,13 @@ from typing import Optional, Set from typing_extensions import Self -class CreateTrainingDeploymentRequest(BaseModel): +class GetClusterResponse(BaseModel): """ - CreateTrainingDeploymentRequest + GetClusterResponse """ # noqa: E501 - name: StrictStr - image_url: StrictStr - hardware_instance_id: StrictInt - __properties: ClassVar[List[str]] = ["name", "image_url", "hardware_instance_id"] + id: StrictInt + display_name: StrictStr + __properties: ClassVar[List[str]] = ["id", "display_name"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTrainingDeploymentRequest from a JSON string""" + """Create an instance of GetClusterResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTrainingDeploymentRequest from a dict""" + """Create an instance of GetClusterResponse from a dict""" if obj is None: return None @@ -82,9 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "name": obj.get("name"), - "image_url": obj.get("image_url"), - "hardware_instance_id": obj.get("hardware_instance_id") + "id": obj.get("id"), + "display_name": obj.get("display_name") }) return _obj diff --git a/platform_api_client/models/get_compute_deployment_response.py b/platform_api_python_client/models/get_compute_v2_deployment_response.py similarity index 65% rename from platform_api_client/models/get_compute_deployment_response.py rename to platform_api_python_client/models/get_compute_v2_deployment_response.py index e40d622..fdef2d0 100644 --- a/platform_api_client/models/get_compute_deployment_response.py +++ b/platform_api_python_client/models/get_compute_v2_deployment_response.py @@ -20,29 +20,29 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set from typing_extensions import Self -class GetComputeDeploymentResponse(BaseModel): +class GetComputeV2DeploymentResponse(BaseModel): """ - GetComputeDeploymentResponse + GetComputeV2DeploymentResponse """ # noqa: E501 + cluster_id: StrictInt id: StrictInt name: StrictStr - image_url: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt - endpoint_url: Optional[StrictStr] + exposed_port: StrictInt + ssh_public_key: Optional[StrictStr] + ssh_password: Optional[StrictStr] env_vars: Optional[Dict[str, StrictStr]] - port: StrictInt - ssh_key: Optional[StrictStr] - username: Optional[StrictStr] - password: Optional[StrictStr] - __properties: ClassVar[List[str]] = ["id", "name", "image_url", "type", "status", "created_at", "hardware_instance_id", "endpoint_url", "env_vars", "port", "ssh_key", "username", "password"] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "exposed_port", "ssh_public_key", "ssh_password", "env_vars"] model_config = ConfigDict( populate_by_name=True, @@ -62,7 +62,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetComputeDeploymentResponse from a JSON string""" + """Create an instance of GetComputeV2DeploymentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -83,36 +83,31 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if endpoint_url (nullable) is None + # set to None if image_url (nullable) is None # and model_fields_set contains the field - if self.endpoint_url is None and "endpoint_url" in self.model_fields_set: - _dict['endpoint_url'] = None + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None - # set to None if env_vars (nullable) is None - # and model_fields_set contains the field - if self.env_vars is None and "env_vars" in self.model_fields_set: - _dict['env_vars'] = None - - # set to None if ssh_key (nullable) is None + # set to None if ssh_public_key (nullable) is None # and model_fields_set contains the field - if self.ssh_key is None and "ssh_key" in self.model_fields_set: - _dict['ssh_key'] = None + if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set: + _dict['ssh_public_key'] = None - # set to None if username (nullable) is None + # set to None if ssh_password (nullable) is None # and model_fields_set contains the field - if self.username is None and "username" in self.model_fields_set: - _dict['username'] = None + if self.ssh_password is None and "ssh_password" in self.model_fields_set: + _dict['ssh_password'] = None - # set to None if password (nullable) is None + # set to None if env_vars (nullable) is None # and model_fields_set contains the field - if self.password is None and "password" in self.model_fields_set: - _dict['password'] = None + if self.env_vars is None and "env_vars" in self.model_fields_set: + _dict['env_vars'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetComputeDeploymentResponse from a dict""" + """Create an instance of GetComputeV2DeploymentResponse from a dict""" if obj is None: return None @@ -120,19 +115,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), "id": obj.get("id"), "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), "image_url": obj.get("image_url"), "type": obj.get("type"), "status": obj.get("status"), "created_at": obj.get("created_at"), "hardware_instance_id": obj.get("hardware_instance_id"), - "endpoint_url": obj.get("endpoint_url"), - "env_vars": obj.get("env_vars"), - "port": obj.get("port"), - "ssh_key": obj.get("ssh_key"), - "username": obj.get("username"), - "password": obj.get("password") + "exposed_port": obj.get("exposed_port"), + "ssh_public_key": obj.get("ssh_public_key"), + "ssh_password": obj.get("ssh_password"), }) return _obj diff --git a/platform_api_client/models/get_deployment_log_response.py b/platform_api_python_client/models/get_deployment_log_response.py similarity index 100% rename from platform_api_client/models/get_deployment_log_response.py rename to platform_api_python_client/models/get_deployment_log_response.py diff --git a/platform_api_python_client/models/get_deployment_usage_response.py b/platform_api_python_client/models/get_deployment_usage_response.py new file mode 100644 index 0000000..0cff4e4 --- /dev/null +++ b/platform_api_python_client/models/get_deployment_usage_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue +from typing import Optional, Set +from typing_extensions import Self + +class GetDeploymentUsageResponse(BaseModel): + """ + GetDeploymentUsageResponse + """ # noqa: E501 + values: List[DeploymentUsageValue] + __properties: ClassVar[List[str]] = ["values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDeploymentUsageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in values (list) + _items = [] + if self.values: + for _item in self.values: + if _item: + _items.append(_item.to_dict()) + _dict['values'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeploymentUsageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": [DeploymentUsageValue.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None + }) + return _obj + + diff --git a/platform_api_client/models/get_deployment_response.py b/platform_api_python_client/models/get_deployment_v2_response.py similarity index 72% rename from platform_api_client/models/get_deployment_response.py rename to platform_api_python_client/models/get_deployment_v2_response.py index 62d3e4e..dfa1b09 100644 --- a/platform_api_client/models/get_deployment_response.py +++ b/platform_api_python_client/models/get_deployment_v2_response.py @@ -19,24 +19,26 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_type import DeploymentType +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set from typing_extensions import Self -class GetDeploymentResponse(BaseModel): +class GetDeploymentV2Response(BaseModel): """ - GetDeploymentResponse + GetDeploymentV2Response """ # noqa: E501 + cluster_id: StrictInt id: StrictInt name: StrictStr - image_url: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt - __properties: ClassVar[List[str]] = ["id", "name", "image_url", "type", "status", "created_at", "hardware_instance_id"] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id"] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetDeploymentResponse from a JSON string""" + """Create an instance of GetDeploymentV2Response from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,11 +79,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetDeploymentResponse from a dict""" + """Create an instance of GetDeploymentV2Response from a dict""" if obj is None: return None @@ -89,8 +96,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), "id": obj.get("id"), "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), "image_url": obj.get("image_url"), "type": obj.get("type"), "status": obj.get("status"), diff --git a/platform_api_client/models/get_inference_deployment_response.py b/platform_api_python_client/models/get_inference_v2_deployment_response.py similarity index 70% rename from platform_api_client/models/get_inference_deployment_response.py rename to platform_api_python_client/models/get_inference_v2_deployment_response.py index 3e3fcab..acbf538 100644 --- a/platform_api_client/models/get_inference_deployment_response.py +++ b/platform_api_python_client/models/get_inference_v2_deployment_response.py @@ -20,31 +20,32 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_client.models.deployment_status import DeploymentStatus -from platform_api_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set from typing_extensions import Self -class GetInferenceDeploymentResponse(BaseModel): +class GetInferenceV2DeploymentResponse(BaseModel): """ - GetInferenceDeploymentResponse + GetInferenceV2DeploymentResponse """ # noqa: E501 + cluster_id: StrictInt id: StrictInt name: StrictStr - image_url: StrictStr + endpoint_url: StrictStr + image_url: Optional[StrictStr] type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt - endpoint_url: Optional[StrictStr] - env_vars: Optional[Dict[str, StrictStr]] - port: StrictInt - min_replicas: StrictInt - max_replicas: StrictInt - timeout: StrictInt + container_port: StrictInt + min_scale: StrictInt + max_scale: StrictInt + concurrency: Optional[StrictInt] healthcheck: Optional[StrictStr] endpoint_certificate_authority: Optional[StrictStr] - __properties: ClassVar[List[str]] = ["id", "name", "image_url", "type", "status", "created_at", "hardware_instance_id", "endpoint_url", "env_vars", "port", "min_replicas", "max_replicas", "timeout", "healthcheck", "endpoint_certificate_authority"] + env_vars: Optional[Dict[str, StrictStr]] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "container_port", "min_scale", "max_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "env_vars"] model_config = ConfigDict( populate_by_name=True, @@ -64,7 +65,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetInferenceDeploymentResponse from a JSON string""" + """Create an instance of GetInferenceV2DeploymentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -85,15 +86,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if endpoint_url (nullable) is None + # set to None if image_url (nullable) is None # and model_fields_set contains the field - if self.endpoint_url is None and "endpoint_url" in self.model_fields_set: - _dict['endpoint_url'] = None + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None - # set to None if env_vars (nullable) is None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field - if self.env_vars is None and "env_vars" in self.model_fields_set: - _dict['env_vars'] = None + if self.concurrency is None and "concurrency" in self.model_fields_set: + _dict['concurrency'] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field @@ -105,11 +106,16 @@ def to_dict(self) -> Dict[str, Any]: if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: _dict['endpoint_certificate_authority'] = None + # set to None if env_vars (nullable) is None + # and model_fields_set contains the field + if self.env_vars is None and "env_vars" in self.model_fields_set: + _dict['env_vars'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetInferenceDeploymentResponse from a dict""" + """Create an instance of GetInferenceV2DeploymentResponse from a dict""" if obj is None: return None @@ -117,21 +123,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "cluster_id": obj.get("cluster_id"), "id": obj.get("id"), "name": obj.get("name"), + "endpoint_url": obj.get("endpoint_url"), "image_url": obj.get("image_url"), "type": obj.get("type"), "status": obj.get("status"), "created_at": obj.get("created_at"), "hardware_instance_id": obj.get("hardware_instance_id"), - "endpoint_url": obj.get("endpoint_url"), - "env_vars": obj.get("env_vars"), - "port": obj.get("port"), - "min_replicas": obj.get("min_replicas"), - "max_replicas": obj.get("max_replicas"), - "timeout": obj.get("timeout"), + "container_port": obj.get("container_port"), + "min_scale": obj.get("min_scale"), + "max_scale": obj.get("max_scale"), + "concurrency": obj.get("concurrency"), "healthcheck": obj.get("healthcheck"), - "endpoint_certificate_authority": obj.get("endpoint_certificate_authority") + "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), }) return _obj diff --git a/platform_api_client/models/hardware_instance_response.py b/platform_api_python_client/models/hardware_instance_response.py similarity index 95% rename from platform_api_client/models/hardware_instance_response.py rename to platform_api_python_client/models/hardware_instance_response.py index 778295d..c94465e 100644 --- a/platform_api_client/models/hardware_instance_response.py +++ b/platform_api_python_client/models/hardware_instance_response.py @@ -32,8 +32,8 @@ class HardwareInstanceResponse(BaseModel): num_gpu: StrictInt cpu: StrictInt memory: StrictInt - cost: StrictInt - __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost"] + cost_per_hr: StrictInt + __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr"] model_config = ConfigDict( populate_by_name=True, @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "num_gpu": obj.get("num_gpu"), "cpu": obj.get("cpu"), "memory": obj.get("memory"), - "cost": obj.get("cost") + "cost_per_hr": obj.get("cost_per_hr") }) return _obj diff --git a/platform_api_python_client/models/health_status.py b/platform_api_python_client/models/health_status.py new file mode 100644 index 0000000..4aebfcb --- /dev/null +++ b/platform_api_python_client/models/health_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class HealthStatus(str, Enum): + """ + HealthStatus + """ + + """ + allowed enum values + """ + HEALTHY = 'Healthy' + PROGRESSING = 'Progressing' + DEGRADED = 'Degraded' + MISSING = 'Missing' + UNKNOWN = 'Unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of HealthStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_client/models/http_validation_error.py b/platform_api_python_client/models/http_validation_error.py similarity index 97% rename from platform_api_client/models/http_validation_error.py rename to platform_api_python_client/models/http_validation_error.py index 3dc09d0..8610c87 100644 --- a/platform_api_client/models/http_validation_error.py +++ b/platform_api_python_client/models/http_validation_error.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from platform_api_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error import ValidationError from typing import Optional, Set from typing_extensions import Self diff --git a/platform_api_client/models/list_get_deployment_response.py b/platform_api_python_client/models/list_api_key_response.py similarity index 83% rename from platform_api_client/models/list_get_deployment_response.py rename to platform_api_python_client/models/list_api_key_response.py index 7eb606a..aab866d 100644 --- a/platform_api_client/models/list_get_deployment_response.py +++ b/platform_api_python_client/models/list_api_key_response.py @@ -19,15 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from platform_api_client.models.get_deployment_response import GetDeploymentResponse +from platform_api_python_client.models.api_key_response import APIKeyResponse from typing import Optional, Set from typing_extensions import Self -class ListGetDeploymentResponse(BaseModel): +class ListAPIKeyResponse(BaseModel): """ - ListGetDeploymentResponse + ListAPIKeyResponse """ # noqa: E501 - results: List[GetDeploymentResponse] + results: List[APIKeyResponse] __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListGetDeploymentResponse from a JSON string""" + """Create an instance of ListAPIKeyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListGetDeploymentResponse from a dict""" + """Create an instance of ListAPIKeyResponse from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [GetDeploymentResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + "results": [APIKeyResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/platform_api_python_client/models/list_c_serve_recipe_response.py b/platform_api_python_client/models/list_c_serve_recipe_response.py new file mode 100644 index 0000000..9f1e716 --- /dev/null +++ b/platform_api_python_client/models/list_c_serve_recipe_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListCServeRecipeResponse(BaseModel): + """ + ListCServeRecipeResponse + """ # noqa: E501 + results: List[CServeRecipeResponse] + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListCServeRecipeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListCServeRecipeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [CServeRecipeResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/list_daily_bill_response.py b/platform_api_python_client/models/list_daily_bill_response.py new file mode 100644 index 0000000..7dda2df --- /dev/null +++ b/platform_api_python_client/models/list_daily_bill_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.daily_bill_response import DailyBillResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListDailyBillResponse(BaseModel): + """ + ListDailyBillResponse + """ # noqa: E501 + results: List[DailyBillResponse] + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListDailyBillResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDailyBillResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [DailyBillResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/list_get_cluster_response.py b/platform_api_python_client/models/list_get_cluster_response.py new file mode 100644 index 0000000..d94d306 --- /dev/null +++ b/platform_api_python_client/models/list_get_cluster_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListGetClusterResponse(BaseModel): + """ + ListGetClusterResponse + """ # noqa: E501 + results: List[GetClusterResponse] + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListGetClusterResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListGetClusterResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [GetClusterResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/list_get_deployment_v2_response.py b/platform_api_python_client/models/list_get_deployment_v2_response.py new file mode 100644 index 0000000..5cda0de --- /dev/null +++ b/platform_api_python_client/models/list_get_deployment_v2_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.get_deployment_v2_response import GetDeploymentV2Response +from typing import Optional, Set +from typing_extensions import Self + +class ListGetDeploymentV2Response(BaseModel): + """ + ListGetDeploymentV2Response + """ # noqa: E501 + results: List[GetDeploymentV2Response] + __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 ListGetDeploymentV2Response 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 in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListGetDeploymentV2Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [GetDeploymentV2Response.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_client/models/list_hardware_instance_response.py b/platform_api_python_client/models/list_hardware_instance_response.py similarity index 96% rename from platform_api_client/models/list_hardware_instance_response.py rename to platform_api_python_client/models/list_hardware_instance_response.py index 5863cab..74ad36a 100644 --- a/platform_api_client/models/list_hardware_instance_response.py +++ b/platform_api_python_client/models/list_hardware_instance_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from platform_api_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse from typing import Optional, Set from typing_extensions import Self diff --git a/platform_api_client/models/list_payment_method_response.py b/platform_api_python_client/models/list_payment_method_response.py similarity index 100% rename from platform_api_client/models/list_payment_method_response.py rename to platform_api_python_client/models/list_payment_method_response.py diff --git a/platform_api_client/models/list_prebuilt_image_response.py b/platform_api_python_client/models/list_prebuilt_image_response.py similarity index 96% rename from platform_api_client/models/list_prebuilt_image_response.py rename to platform_api_python_client/models/list_prebuilt_image_response.py index b151e13..eb249fa 100644 --- a/platform_api_client/models/list_prebuilt_image_response.py +++ b/platform_api_python_client/models/list_prebuilt_image_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from platform_api_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from typing import Optional, Set from typing_extensions import Self diff --git a/platform_api_python_client/models/metric.py b/platform_api_python_client/models/metric.py new file mode 100644 index 0000000..c5aea27 --- /dev/null +++ b/platform_api_python_client/models/metric.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Metric(str, Enum): + """ + Metric + """ + + """ + allowed enum values + """ + CPU = 'cpu' + MEMORY = 'memory' + GPU = 'gpu' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Metric from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_client/models/prebuilt_image_response.py b/platform_api_python_client/models/prebuilt_image_response.py similarity index 97% rename from platform_api_client/models/prebuilt_image_response.py rename to platform_api_python_client/models/prebuilt_image_response.py index a619a0d..f5b7a1a 100644 --- a/platform_api_client/models/prebuilt_image_response.py +++ b/platform_api_python_client/models/prebuilt_image_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from platform_api_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set from typing_extensions import Self diff --git a/platform_api_client/models/validation_error.py b/platform_api_python_client/models/validation_error.py similarity index 91% rename from platform_api_client/models/validation_error.py rename to platform_api_python_client/models/validation_error.py index 7e8cebc..e64b7dc 100644 --- a/platform_api_client/models/validation_error.py +++ b/platform_api_python_client/models/validation_error.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from platform_api_client.models.location_inner import LocationInner +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class ValidationError(BaseModel): """ ValidationError """ # noqa: E501 - loc: List[LocationInner] + loc: List[ValidationErrorLocInner] msg: StrictStr type: StrictStr __properties: ClassVar[List[str]] = ["loc", "msg", "type"] @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "loc": [LocationInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, + "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, "msg": obj.get("msg"), "type": obj.get("type") }) diff --git a/platform_api_client/models/location_inner.py b/platform_api_python_client/models/validation_error_loc_inner.py similarity index 91% rename from platform_api_client/models/location_inner.py rename to platform_api_python_client/models/validation_error_loc_inner.py index 97f31a2..abee848 100644 --- a/platform_api_client/models/location_inner.py +++ b/platform_api_python_client/models/validation_error_loc_inner.py @@ -23,11 +23,11 @@ from typing_extensions import Literal, Self from pydantic import Field -LOCATIONINNER_ANY_OF_SCHEMAS = ["int", "str"] +VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"] -class LocationInner(BaseModel): +class ValidationErrorLocInner(BaseModel): """ - LocationInner + ValidationErrorLocInner """ # data type: str @@ -57,7 +57,7 @@ def __init__(self, *args, **kwargs) -> None: @field_validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): - instance = LocationInner.model_construct() + instance = ValidationErrorLocInner.model_construct() error_messages = [] # validate data type: str try: @@ -73,7 +73,7 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in LocationInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) else: return v @@ -107,7 +107,7 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into LocationInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) else: return instance diff --git a/platform_api_client/py.typed b/platform_api_python_client/py.typed similarity index 100% rename from platform_api_client/py.typed rename to platform_api_python_client/py.typed diff --git a/platform_api_client/rest.py b/platform_api_python_client/rest.py similarity index 99% rename from platform_api_client/rest.py rename to platform_api_python_client/rest.py index 66ee7c9..efb333e 100644 --- a/platform_api_client/rest.py +++ b/platform_api_python_client/rest.py @@ -19,7 +19,7 @@ import urllib3 -from platform_api_client.exceptions import ApiException, ApiValueError +from platform_api_python_client.exceptions import ApiException, ApiValueError SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse diff --git a/pyproject.toml b/pyproject.toml index 2138dac..dff7a83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] -name = "platform_api_client" +name = "platform_api_python_client" version = "1.0.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +repository = "https://github.com/centml/platform/client" keywords = ["OpenAPI", "OpenAPI-Generator", "Platform External API"] -include = ["platform_api_client/py.typed"] +include = ["platform_api_python_client/py.typed"] [tool.poetry.dependencies] python = "^3.7" @@ -34,7 +34,7 @@ extension-pkg-whitelist = "pydantic" [tool.mypy] files = [ - "platform_api_client", + "platform_api_python_client", #"test", # auto-generated tests "tests", # hand-written tests ] diff --git a/setup.py b/setup.py index d2e8674..4d15dfa 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -NAME = "platform-api-client" +NAME = "platform-api-python-client" VERSION = "1.0.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ @@ -45,5 +45,5 @@ long_description="""\ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) """, # noqa: E501 - package_data={"platform_api_client": ["py.typed"]}, + package_data={"platform_api_python_client": ["py.typed"]}, ) diff --git a/test/test_add_hardware_request.py b/test/test_add_hardware_request.py new file mode 100644 index 0000000..12841df --- /dev/null +++ b/test/test_add_hardware_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.add_hardware_request import AddHardwareRequest + +class TestAddHardwareRequest(unittest.TestCase): + """AddHardwareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddHardwareRequest: + """Test AddHardwareRequest + include_option 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 `AddHardwareRequest` + """ + model = AddHardwareRequest() + if include_optional: + return AddHardwareRequest( + message = '' + ) + else: + return AddHardwareRequest( + message = '', + ) + """ + + def testAddHardwareRequest(self): + """Test AddHardwareRequest""" + # 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_location_inner.py b/test/test_api_key_request.py similarity index 61% rename from test/test_location_inner.py rename to test/test_api_key_request.py index f4b2cea..a9407ea 100644 --- a/test/test_location_inner.py +++ b/test/test_api_key_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.location_inner import LocationInner +from platform_api_python_client.models.api_key_request import APIKeyRequest -class TestLocationInner(unittest.TestCase): - """LocationInner unit test stubs""" +class TestAPIKeyRequest(unittest.TestCase): + """APIKeyRequest unit test stubs""" def setUp(self): pass @@ -25,24 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> LocationInner: - """Test LocationInner + def make_instance(self, include_optional) -> APIKeyRequest: + """Test APIKeyRequest include_option 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 `LocationInner` + # uncomment below to create an instance of `APIKeyRequest` """ - model = LocationInner() + model = APIKeyRequest() if include_optional: - return LocationInner( + return APIKeyRequest( + name = '' ) else: - return LocationInner( + return APIKeyRequest( + name = '', ) """ - def testLocationInner(self): - """Test LocationInner""" + def testAPIKeyRequest(self): + """Test APIKeyRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_training_deployment_request.py b/test/test_api_key_response.py similarity index 52% rename from test/test_create_training_deployment_request.py rename to test/test_api_key_response.py index b00bc2e..05757ee 100644 --- a/test/test_create_training_deployment_request.py +++ b/test/test_api_key_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.create_training_deployment_request import CreateTrainingDeploymentRequest +from platform_api_python_client.models.api_key_response import APIKeyResponse -class TestCreateTrainingDeploymentRequest(unittest.TestCase): - """CreateTrainingDeploymentRequest unit test stubs""" +class TestAPIKeyResponse(unittest.TestCase): + """APIKeyResponse unit test stubs""" def setUp(self): pass @@ -25,30 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateTrainingDeploymentRequest: - """Test CreateTrainingDeploymentRequest + def make_instance(self, include_optional) -> APIKeyResponse: + """Test APIKeyResponse include_option 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 `CreateTrainingDeploymentRequest` + # uncomment below to create an instance of `APIKeyResponse` """ - model = CreateTrainingDeploymentRequest() + model = APIKeyResponse() if include_optional: - return CreateTrainingDeploymentRequest( + return APIKeyResponse( name = '', - image_url = '', - hardware_instance_id = 56 + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return CreateTrainingDeploymentRequest( + return APIKeyResponse( name = '', - image_url = '', - hardware_instance_id = 56, + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) """ - def testCreateTrainingDeploymentRequest(self): - """Test CreateTrainingDeploymentRequest""" + def testAPIKeyResponse(self): + """Test APIKeyResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_c_serve_recipe_input.py b/test/test_c_serve_recipe_input.py new file mode 100644 index 0000000..92807d4 --- /dev/null +++ b/test/test_c_serve_recipe_input.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_input import CServeRecipeInput + +class TestCServeRecipeInput(unittest.TestCase): + """CServeRecipeInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipeInput: + """Test CServeRecipeInput + include_option 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 `CServeRecipeInput` + """ + model = CServeRecipeInput() + if include_optional: + return CServeRecipeInput( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56 + ) + else: + return CServeRecipeInput( + model = '', + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + ) + """ + + def testCServeRecipeInput(self): + """Test CServeRecipeInput""" + # 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_c_serve_recipe_output.py b/test/test_c_serve_recipe_output.py new file mode 100644 index 0000000..956d46a --- /dev/null +++ b/test/test_c_serve_recipe_output.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_output import CServeRecipeOutput + +class TestCServeRecipeOutput(unittest.TestCase): + """CServeRecipeOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipeOutput: + """Test CServeRecipeOutput + include_option 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 `CServeRecipeOutput` + """ + model = CServeRecipeOutput() + if include_optional: + return CServeRecipeOutput( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56 + ) + else: + return CServeRecipeOutput( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + ) + """ + + def testCServeRecipeOutput(self): + """Test CServeRecipeOutput""" + # 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_c_serve_recipe_perf.py b/test/test_c_serve_recipe_perf.py new file mode 100644 index 0000000..d774ac7 --- /dev/null +++ b/test/test_c_serve_recipe_perf.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf + +class TestCServeRecipePerf(unittest.TestCase): + """CServeRecipePerf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipePerf: + """Test CServeRecipePerf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeRecipePerf` + """ + model = CServeRecipePerf() + if include_optional: + return CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ] + ) + else: + return CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], + ) + """ + + def testCServeRecipePerf(self): + """Test CServeRecipePerf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_c_serve_recipe_response.py b/test/test_c_serve_recipe_response.py new file mode 100644 index 0000000..48d14e4 --- /dev/null +++ b/test/test_c_serve_recipe_response.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse + +class TestCServeRecipeResponse(unittest.TestCase): + """CServeRecipeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CServeRecipeResponse: + """Test CServeRecipeResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CServeRecipeResponse` + """ + model = CServeRecipeResponse() + if include_optional: + return CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ) + ) + else: + return CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + ) + """ + + def testCServeRecipeResponse(self): + """Test CServeRecipeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_client_secret_response.py b/test/test_client_secret_response.py index ca39d11..71ae136 100644 --- a/test/test_client_secret_response.py +++ b/test/test_client_secret_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.client_secret_response import ClientSecretResponse class TestClientSecretResponse(unittest.TestCase): """ClientSecretResponse unit test stubs""" diff --git a/test/test_create_c_serve_deployment_request.py b/test/test_create_c_serve_deployment_request.py new file mode 100644 index 0000000..147ebef --- /dev/null +++ b/test/test_create_c_serve_deployment_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest + +class TestCreateCServeDeploymentRequest(unittest.TestCase): + """CreateCServeDeploymentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: + """Test CreateCServeDeploymentRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCServeDeploymentRequest` + """ + model = CreateCServeDeploymentRequest() + if include_optional: + return CreateCServeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hf_token = '', + endpoint_certificate_authority = '', + min_scale = 56, + max_scale = 56, + concurrency = 56 + ) + else: + return CreateCServeDeploymentRequest( + name = '', + cluster_id = 56, + hardware_instance_id = 56, + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hf_token = '', + min_scale = 56, + max_scale = 56, + ) + """ + + def testCreateCServeDeploymentRequest(self): + """Test CreateCServeDeploymentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_training_deployment_response.py b/test/test_create_c_serve_deployment_response.py similarity index 63% rename from test/test_create_training_deployment_response.py rename to test/test_create_c_serve_deployment_response.py index 778b855..1d1f78c 100644 --- a/test/test_create_training_deployment_response.py +++ b/test/test_create_c_serve_deployment_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.create_training_deployment_response import CreateTrainingDeploymentResponse +from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse -class TestCreateTrainingDeploymentResponse(unittest.TestCase): - """CreateTrainingDeploymentResponse unit test stubs""" +class TestCreateCServeDeploymentResponse(unittest.TestCase): + """CreateCServeDeploymentResponse unit test stubs""" def setUp(self): pass @@ -25,30 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateTrainingDeploymentResponse: - """Test CreateTrainingDeploymentResponse + def make_instance(self, include_optional) -> CreateCServeDeploymentResponse: + """Test CreateCServeDeploymentResponse include_option 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 `CreateTrainingDeploymentResponse` + # uncomment below to create an instance of `CreateCServeDeploymentResponse` """ - model = CreateTrainingDeploymentResponse() + model = CreateCServeDeploymentResponse() if include_optional: - return CreateTrainingDeploymentResponse( + return CreateCServeDeploymentResponse( id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), endpoint_url = '' ) else: - return CreateTrainingDeploymentResponse( + return CreateCServeDeploymentResponse( id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), endpoint_url = '', ) """ - def testCreateTrainingDeploymentResponse(self): - """Test CreateTrainingDeploymentResponse""" + def testCreateCServeDeploymentResponse(self): + """Test CreateCServeDeploymentResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_compute_deployment_response.py b/test/test_create_compute_deployment_response.py index c52c73a..d29e622 100644 --- a/test/test_create_compute_deployment_response.py +++ b/test/test_create_compute_deployment_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse +from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse class TestCreateComputeDeploymentResponse(unittest.TestCase): """CreateComputeDeploymentResponse unit test stubs""" diff --git a/test/test_create_compute_deployment_request.py b/test/test_create_compute_deployment_v2_request.py similarity index 62% rename from test/test_create_compute_deployment_request.py rename to test/test_create_compute_deployment_v2_request.py index 1647a84..e6a7422 100644 --- a/test/test_create_compute_deployment_request.py +++ b/test/test_create_compute_deployment_v2_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest +from platform_api_python_client.models.create_compute_deployment_v2_request import CreateComputeDeploymentV2Request -class TestCreateComputeDeploymentRequest(unittest.TestCase): - """CreateComputeDeploymentRequest unit test stubs""" +class TestCreateComputeDeploymentV2Request(unittest.TestCase): + """CreateComputeDeploymentV2Request unit test stubs""" def setUp(self): pass @@ -25,35 +25,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateComputeDeploymentRequest: - """Test CreateComputeDeploymentRequest + def make_instance(self, include_optional) -> CreateComputeDeploymentV2Request: + """Test CreateComputeDeploymentV2Request include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateComputeDeploymentRequest` + # uncomment below to create an instance of `CreateComputeDeploymentV2Request` """ - model = CreateComputeDeploymentRequest() + model = CreateComputeDeploymentV2Request() if include_optional: - return CreateComputeDeploymentRequest( + return CreateComputeDeploymentV2Request( name = '', - image_url = '', + cluster_id = 56, hardware_instance_id = 56, - ssh_key = '', - username = '', - password = '' + image_url = '', + ssh_public_key = '', + ssh_password = '' ) else: - return CreateComputeDeploymentRequest( + return CreateComputeDeploymentV2Request( name = '', - image_url = '', + cluster_id = 56, hardware_instance_id = 56, - username = '', - password = '', + image_url = '', ) """ - def testCreateComputeDeploymentRequest(self): - """Test CreateComputeDeploymentRequest""" + def testCreateComputeDeploymentV2Request(self): + """Test CreateComputeDeploymentV2Request""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_inference_deployment_response.py b/test/test_create_inference_deployment_response.py index 4ebc572..3a93cf7 100644 --- a/test/test_create_inference_deployment_response.py +++ b/test/test_create_inference_deployment_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse class TestCreateInferenceDeploymentResponse(unittest.TestCase): """CreateInferenceDeploymentResponse unit test stubs""" diff --git a/test/test_create_inference_deployment_request.py b/test/test_create_inference_deployment_v2_request.py similarity index 65% rename from test/test_create_inference_deployment_request.py rename to test/test_create_inference_deployment_v2_request.py index 8bfa275..36af77e 100644 --- a/test/test_create_inference_deployment_request.py +++ b/test/test_create_inference_deployment_v2_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest +from platform_api_python_client.models.create_inference_deployment_v2_request import CreateInferenceDeploymentV2Request -class TestCreateInferenceDeploymentRequest(unittest.TestCase): - """CreateInferenceDeploymentRequest unit test stubs""" +class TestCreateInferenceDeploymentV2Request(unittest.TestCase): + """CreateInferenceDeploymentV2Request unit test stubs""" def setUp(self): pass @@ -25,23 +25,24 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: - """Test CreateInferenceDeploymentRequest + def make_instance(self, include_optional) -> CreateInferenceDeploymentV2Request: + """Test CreateInferenceDeploymentV2Request include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateInferenceDeploymentRequest` + # uncomment below to create an instance of `CreateInferenceDeploymentV2Request` """ - model = CreateInferenceDeploymentRequest() + model = CreateInferenceDeploymentV2Request() if include_optional: - return CreateInferenceDeploymentRequest( + return CreateInferenceDeploymentV2Request( name = '', - image_url = '', + cluster_id = 56, hardware_instance_id = 56, + image_url = '', port = 56, - min_replicas = 56, - max_replicas = 56, - timeout = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, healthcheck = '', env_vars = { 'key' : '' @@ -55,18 +56,19 @@ def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: endpoint_certificate_authority = '' ) else: - return CreateInferenceDeploymentRequest( + return CreateInferenceDeploymentV2Request( name = '', - image_url = '', + cluster_id = 56, hardware_instance_id = 56, + image_url = '', port = 56, - min_replicas = 56, - max_replicas = 56, + min_scale = 56, + max_scale = 56, ) """ - def testCreateInferenceDeploymentRequest(self): - """Test CreateInferenceDeploymentRequest""" + def testCreateInferenceDeploymentV2Request(self): + """Test CreateInferenceDeploymentV2Request""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_payment_request.py b/test/test_create_payment_request.py index a71840a..5a8a5e3 100644 --- a/test/test_create_payment_request.py +++ b/test/test_create_payment_request.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.create_payment_request import CreatePaymentRequest +from platform_api_python_client.models.create_payment_request import CreatePaymentRequest class TestCreatePaymentRequest(unittest.TestCase): """CreatePaymentRequest unit test stubs""" diff --git a/test/test_credits_response.py b/test/test_credits_response.py index b1f8532..0b7011a 100644 --- a/test/test_credits_response.py +++ b/test/test_credits_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.credits_response import CreditsResponse +from platform_api_python_client.models.credits_response import CreditsResponse class TestCreditsResponse(unittest.TestCase): """CreditsResponse unit test stubs""" diff --git a/test/test_daily_bill_response.py b/test/test_daily_bill_response.py new file mode 100644 index 0000000..5c876e4 --- /dev/null +++ b/test/test_daily_bill_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.daily_bill_response import DailyBillResponse + +class TestDailyBillResponse(unittest.TestCase): + """DailyBillResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DailyBillResponse: + """Test DailyBillResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DailyBillResponse` + """ + model = DailyBillResponse() + if include_optional: + return DailyBillResponse( + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 56 + ) + else: + return DailyBillResponse( + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 56, + ) + """ + + def testDailyBillResponse(self): + """Test DailyBillResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_deployment_status.py b/test/test_deployment_status.py index ecafda7..4df85c2 100644 --- a/test/test_deployment_status.py +++ b/test/test_deployment_status.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_status import DeploymentStatus class TestDeploymentStatus(unittest.TestCase): """DeploymentStatus unit test stubs""" diff --git a/test/test_deployment_status_request.py b/test/test_deployment_status_request.py index 21de6f2..d5cff0a 100644 --- a/test/test_deployment_status_request.py +++ b/test/test_deployment_status_request.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.deployment_status_request import DeploymentStatusRequest +from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest class TestDeploymentStatusRequest(unittest.TestCase): """DeploymentStatusRequest unit test stubs""" diff --git a/test/test_deployment_status_response.py b/test/test_deployment_status_response_v2.py similarity index 68% rename from test/test_deployment_status_response.py rename to test/test_deployment_status_response_v2.py index f6ac956..39da1f6 100644 --- a/test/test_deployment_status_response.py +++ b/test/test_deployment_status_response_v2.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.models.deployment_status_response_v2 import DeploymentStatusResponseV2 -class TestDeploymentStatusResponse(unittest.TestCase): - """DeploymentStatusResponse unit test stubs""" +class TestDeploymentStatusResponseV2(unittest.TestCase): + """DeploymentStatusResponseV2 unit test stubs""" def setUp(self): pass @@ -25,36 +25,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> DeploymentStatusResponse: - """Test DeploymentStatusResponse + def make_instance(self, include_optional) -> DeploymentStatusResponseV2: + """Test DeploymentStatusResponseV2 include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `DeploymentStatusResponse` + # uncomment below to create an instance of `DeploymentStatusResponseV2` """ - model = DeploymentStatusResponse() + model = DeploymentStatusResponseV2() if include_optional: - return DeploymentStatusResponse( + return DeploymentStatusResponseV2( id = 56, type = 'inference', status = 'active', - service_status = 'UNKNOWN', + service_status = 'Healthy', error_message = '', endpoint_url = '' ) else: - return DeploymentStatusResponse( + return DeploymentStatusResponseV2( id = 56, type = 'inference', status = 'active', - service_status = 'UNKNOWN', + service_status = 'Healthy', error_message = '', endpoint_url = '', ) """ - def testDeploymentStatusResponse(self): - """Test DeploymentStatusResponse""" + def testDeploymentStatusResponseV2(self): + """Test DeploymentStatusResponseV2""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_deployment_type.py b/test/test_deployment_type.py index efb01d2..1029576 100644 --- a/test/test_deployment_type.py +++ b/test/test_deployment_type.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.deployment_type import DeploymentType class TestDeploymentType(unittest.TestCase): """DeploymentType unit test stubs""" diff --git a/test/test_deployment_usage_value.py b/test/test_deployment_usage_value.py new file mode 100644 index 0000000..39f0a5a --- /dev/null +++ b/test/test_deployment_usage_value.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue + +class TestDeploymentUsageValue(unittest.TestCase): + """DeploymentUsageValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeploymentUsageValue: + """Test DeploymentUsageValue + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeploymentUsageValue` + """ + model = DeploymentUsageValue() + if include_optional: + return DeploymentUsageValue( + timestamp = 56, + value = 1.337 + ) + else: + return DeploymentUsageValue( + timestamp = 56, + value = 1.337, + ) + """ + + def testDeploymentUsageValue(self): + """Test DeploymentUsageValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_api.py b/test/test_external_api.py index 66d9660..b556b63 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.api.external_api import EXTERNALApi +from platform_api_python_client.api.external_api import EXTERNALApi class TestEXTERNALApi(unittest.TestCase): @@ -26,15 +26,43 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_create_compute_deployment_deployments_compute_post(self) -> None: - """Test case for create_compute_deployment_deployments_compute_post + def test_add_feedback_request_support_feedback_post(self) -> None: + """Test case for add_feedback_request_support_feedback_post + + Add Feedback Request + """ + pass + + def test_create_api_key_credentials_api_key_post(self) -> None: + """Test case for create_api_key_credentials_api_key_post + + Create Api Key + """ + pass + + def test_create_compute_deployment_deployments_v2_compute_post(self) -> None: + """Test case for create_compute_deployment_deployments_v2_compute_post Create Compute Deployment """ pass - def test_create_inference_deployment_deployments_inference_post(self) -> None: - """Test case for create_inference_deployment_deployments_inference_post + def test_create_cserve_deployment_deployments_v2_cserve_post(self) -> None: + """Test case for create_cserve_deployment_deployments_v2_cserve_post + + Create Cserve Deployment + """ + pass + + def test_create_hardware_request_support_hardware_request_post(self) -> None: + """Test case for create_hardware_request_support_hardware_request_post + + Create Hardware Request + """ + pass + + def test_create_inference_deployment_deployments_v2_inference_post(self) -> None: + """Test case for create_inference_deployment_deployments_v2_inference_post Create Inference Deployment """ @@ -54,10 +82,10 @@ def test_create_payment_setup_payments_setup_post(self) -> None: """ pass - def test_create_training_deployment_deployments_training_post(self) -> None: - """Test case for create_training_deployment_deployments_training_post + def test_delete_api_key_credentials_api_key_id_delete(self) -> None: + """Test case for delete_api_key_credentials_api_key_id_delete - Create Training Deployment + Delete Api Key """ pass @@ -68,8 +96,22 @@ def test_delete_payment_method_payments_methods_payment_method_delete(self) -> N """ pass - def test_get_compute_deployment_deployments_compute_deployment_id_get(self) -> None: - """Test case for get_compute_deployment_deployments_compute_deployment_id_get + def test_get_api_keys_credentials_api_key_get(self) -> None: + """Test case for get_api_keys_credentials_api_key_get + + Get Api Keys + """ + pass + + def test_get_clusters_clusters_get(self) -> None: + """Test case for get_clusters_clusters_get + + Get Clusters + """ + pass + + def test_get_compute_deployment_deployments_v2_compute_deployment_id_get(self) -> None: + """Test case for get_compute_deployment_deployments_v2_compute_deployment_id_get Get Compute Deployment """ @@ -82,6 +124,20 @@ def test_get_credits_credits_get(self) -> None: """ pass + def test_get_cserve_deployment_deployments_v2_cserve_deployment_id_get(self) -> None: + """Test case for get_cserve_deployment_deployments_v2_cserve_deployment_id_get + + Get Cserve Deployment + """ + pass + + def test_get_cserve_recipe_deployments_v2_cserve_recipes_get(self) -> None: + """Test case for get_cserve_recipe_deployments_v2_cserve_recipes_get + + Get Cserve Recipe + """ + pass + def test_get_deployment_logs_deployments_logs_deployment_id_get(self) -> None: """Test case for get_deployment_logs_deployments_logs_deployment_id_get @@ -89,15 +145,15 @@ def test_get_deployment_logs_deployments_logs_deployment_id_get(self) -> None: """ pass - def test_get_deployment_status_deployments_status_deployment_id_get(self) -> None: - """Test case for get_deployment_status_deployments_status_deployment_id_get + def test_get_deployment_status_deployments_v2_status_deployment_id_get(self) -> None: + """Test case for get_deployment_status_deployments_v2_status_deployment_id_get Get Deployment Status """ pass - def test_get_deployments_deployments_get(self) -> None: - """Test case for get_deployments_deployments_get + def test_get_deployments_deployments_v2_get(self) -> None: + """Test case for get_deployments_deployments_v2_get Get Deployments """ @@ -110,8 +166,15 @@ def test_get_hardware_instances_hardware_instances_get(self) -> None: """ pass - def test_get_inference_deployment_deployments_inference_deployment_id_get(self) -> None: - """Test case for get_inference_deployment_deployments_inference_deployment_id_get + def test_get_hardware_instances_hardware_instances_v2_get(self) -> None: + """Test case for get_hardware_instances_hardware_instances_v2_get + + Get Hardware Instances + """ + pass + + def test_get_inference_deployment_deployments_v2_inference_deployment_id_get(self) -> None: + """Test case for get_inference_deployment_deployments_v2_inference_deployment_id_get Get Inference Deployment """ @@ -131,15 +194,22 @@ def test_get_prebuilt_images_prebuilt_images_get(self) -> None: """ pass - def test_get_training_deployment_deployments_training_deployment_id_get(self) -> None: - """Test case for get_training_deployment_deployments_training_deployment_id_get + def test_get_usage_daily_bills_get(self) -> None: + """Test case for get_usage_daily_bills_get + + Get Usage + """ + pass + + def test_get_usage_deployments_usage_deployment_id_get(self) -> None: + """Test case for get_usage_deployments_usage_deployment_id_get - Get Training Deployment + Get Usage """ pass - def test_update_deployment_status_deployments_status_deployment_id_put(self) -> None: - """Test case for update_deployment_status_deployments_status_deployment_id_put + def test_update_deployment_status_deployments_v2_status_deployment_id_put(self) -> None: + """Test case for update_deployment_status_deployments_v2_status_deployment_id_put Update Deployment Status """ diff --git a/test/test_feedback_request.py b/test/test_feedback_request.py new file mode 100644 index 0000000..c5b37d1 --- /dev/null +++ b/test/test_feedback_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.feedback_request import FeedbackRequest + +class TestFeedbackRequest(unittest.TestCase): + """FeedbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FeedbackRequest: + """Test FeedbackRequest + include_option 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 `FeedbackRequest` + """ + model = FeedbackRequest() + if include_optional: + return FeedbackRequest( + message = '', + rating = 56, + follow_up = True + ) + else: + return FeedbackRequest( + message = '', + rating = 56, + follow_up = True, + ) + """ + + def testFeedbackRequest(self): + """Test FeedbackRequest""" + # 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_get_c_serve_deployment_response.py b/test/test_get_c_serve_deployment_response.py new file mode 100644 index 0000000..7aa2487 --- /dev/null +++ b/test/test_get_c_serve_deployment_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse + +class TestGetCServeDeploymentResponse(unittest.TestCase): + """GetCServeDeploymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetCServeDeploymentResponse: + """Test GetCServeDeploymentResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetCServeDeploymentResponse` + """ + model = GetCServeDeploymentResponse() + if include_optional: + return GetCServeDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56 + ) + else: + return GetCServeDeploymentResponse( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, + cluster_id = 56, + id = 56, + name = '', + endpoint_url = '', + image_url = '', + type = 'inference', + status = 'active', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hardware_instance_id = 56, + min_scale = 56, + max_scale = 56, + endpoint_certificate_authority = '', + concurrency = 56, + ) + """ + + def testGetCServeDeploymentResponse(self): + """Test GetCServeDeploymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_cluster_response.py b/test/test_get_cluster_response.py new file mode 100644 index 0000000..fe01592 --- /dev/null +++ b/test/test_get_cluster_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_cluster_response import GetClusterResponse + +class TestGetClusterResponse(unittest.TestCase): + """GetClusterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetClusterResponse: + """Test GetClusterResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetClusterResponse` + """ + model = GetClusterResponse() + if include_optional: + return GetClusterResponse( + id = 56, + display_name = '' + ) + else: + return GetClusterResponse( + id = 56, + display_name = '', + ) + """ + + def testGetClusterResponse(self): + """Test GetClusterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_compute_deployment_response.py b/test/test_get_compute_deployment_response.py deleted file mode 100644 index 8845e58..0000000 --- a/test/test_get_compute_deployment_response.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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_client.models.get_compute_deployment_response import GetComputeDeploymentResponse - -class TestGetComputeDeploymentResponse(unittest.TestCase): - """GetComputeDeploymentResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetComputeDeploymentResponse: - """Test GetComputeDeploymentResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetComputeDeploymentResponse` - """ - model = GetComputeDeploymentResponse() - if include_optional: - return GetComputeDeploymentResponse( - id = 56, - name = '', - image_url = '', - type = 'inference', - status = 'active', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hardware_instance_id = 56, - endpoint_url = '', - env_vars = { - 'key' : '' - }, - port = 56, - ssh_key = '', - username = '', - password = '' - ) - else: - return GetComputeDeploymentResponse( - id = 56, - name = '', - image_url = '', - type = 'inference', - status = 'active', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hardware_instance_id = 56, - endpoint_url = '', - env_vars = { - 'key' : '' - }, - port = 56, - ssh_key = '', - username = '', - password = '', - ) - """ - - def testGetComputeDeploymentResponse(self): - """Test GetComputeDeploymentResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_get_training_deployment_response.py b/test/test_get_compute_v2_deployment_response.py similarity index 63% rename from test/test_get_training_deployment_response.py rename to test/test_get_compute_v2_deployment_response.py index 8a7c8ed..4c59b8a 100644 --- a/test/test_get_training_deployment_response.py +++ b/test/test_get_compute_v2_deployment_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.get_training_deployment_response import GetTrainingDeploymentResponse +from platform_api_python_client.models.get_compute_v2_deployment_response import GetComputeV2DeploymentResponse -class TestGetTrainingDeploymentResponse(unittest.TestCase): - """GetTrainingDeploymentResponse unit test stubs""" +class TestGetComputeV2DeploymentResponse(unittest.TestCase): + """GetComputeV2DeploymentResponse unit test stubs""" def setUp(self): pass @@ -25,46 +25,54 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetTrainingDeploymentResponse: - """Test GetTrainingDeploymentResponse + def make_instance(self, include_optional) -> GetComputeV2DeploymentResponse: + """Test GetComputeV2DeploymentResponse include_option 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 `GetTrainingDeploymentResponse` + # uncomment below to create an instance of `GetComputeV2DeploymentResponse` """ - model = GetTrainingDeploymentResponse() + model = GetComputeV2DeploymentResponse() if include_optional: - return GetTrainingDeploymentResponse( + return GetComputeV2DeploymentResponse( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, - endpoint_url = '', + exposed_port = 56, + ssh_public_key = '', + ssh_password = '', env_vars = { 'key' : '' } ) else: - return GetTrainingDeploymentResponse( + return GetComputeV2DeploymentResponse( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, - endpoint_url = '', + exposed_port = 56, + ssh_public_key = '', + ssh_password = '', env_vars = { 'key' : '' }, ) """ - def testGetTrainingDeploymentResponse(self): - """Test GetTrainingDeploymentResponse""" + def testGetComputeV2DeploymentResponse(self): + """Test GetComputeV2DeploymentResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_deployment_log_response.py b/test/test_get_deployment_log_response.py index a84e4e4..e089ff1 100644 --- a/test/test_get_deployment_log_response.py +++ b/test/test_get_deployment_log_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.get_deployment_log_response import GetDeploymentLogResponse +from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse class TestGetDeploymentLogResponse(unittest.TestCase): """GetDeploymentLogResponse unit test stubs""" diff --git a/test/test_get_deployment_usage_response.py b/test/test_get_deployment_usage_response.py new file mode 100644 index 0000000..1912098 --- /dev/null +++ b/test/test_get_deployment_usage_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse + +class TestGetDeploymentUsageResponse(unittest.TestCase): + """GetDeploymentUsageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeploymentUsageResponse: + """Test GetDeploymentUsageResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDeploymentUsageResponse` + """ + model = GetDeploymentUsageResponse() + if include_optional: + return GetDeploymentUsageResponse( + values = [ + platform_api_python_client.models.deployment_usage_value.DeploymentUsageValue( + timestamp = 56, + value = 1.337, ) + ] + ) + else: + return GetDeploymentUsageResponse( + values = [ + platform_api_python_client.models.deployment_usage_value.DeploymentUsageValue( + timestamp = 56, + value = 1.337, ) + ], + ) + """ + + def testGetDeploymentUsageResponse(self): + """Test GetDeploymentUsageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_deployment_response.py b/test/test_get_deployment_v2_response.py similarity index 69% rename from test/test_get_deployment_response.py rename to test/test_get_deployment_v2_response.py index 3e131fa..7160ce4 100644 --- a/test/test_get_deployment_response.py +++ b/test/test_get_deployment_v2_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.get_deployment_response import GetDeploymentResponse +from platform_api_python_client.models.get_deployment_v2_response import GetDeploymentV2Response -class TestGetDeploymentResponse(unittest.TestCase): - """GetDeploymentResponse unit test stubs""" +class TestGetDeploymentV2Response(unittest.TestCase): + """GetDeploymentV2Response unit test stubs""" def setUp(self): pass @@ -25,18 +25,20 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetDeploymentResponse: - """Test GetDeploymentResponse + def make_instance(self, include_optional) -> GetDeploymentV2Response: + """Test GetDeploymentV2Response include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `GetDeploymentResponse` + # uncomment below to create an instance of `GetDeploymentV2Response` """ - model = GetDeploymentResponse() + model = GetDeploymentV2Response() if include_optional: - return GetDeploymentResponse( + return GetDeploymentV2Response( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', @@ -44,9 +46,11 @@ def make_instance(self, include_optional) -> GetDeploymentResponse: hardware_instance_id = 56 ) else: - return GetDeploymentResponse( + return GetDeploymentV2Response( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', @@ -55,8 +59,8 @@ def make_instance(self, include_optional) -> GetDeploymentResponse: ) """ - def testGetDeploymentResponse(self): - """Test GetDeploymentResponse""" + def testGetDeploymentV2Response(self): + """Test GetDeploymentV2Response""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_inference_deployment_response.py b/test/test_get_inference_v2_deployment_response.py similarity index 63% rename from test/test_get_inference_deployment_response.py rename to test/test_get_inference_v2_deployment_response.py index dc2b3ad..9f69c16 100644 --- a/test/test_get_inference_deployment_response.py +++ b/test/test_get_inference_v2_deployment_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse +from platform_api_python_client.models.get_inference_v2_deployment_response import GetInferenceV2DeploymentResponse -class TestGetInferenceDeploymentResponse(unittest.TestCase): - """GetInferenceDeploymentResponse unit test stubs""" +class TestGetInferenceV2DeploymentResponse(unittest.TestCase): + """GetInferenceV2DeploymentResponse unit test stubs""" def setUp(self): pass @@ -25,58 +25,60 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetInferenceDeploymentResponse: - """Test GetInferenceDeploymentResponse + def make_instance(self, include_optional) -> GetInferenceV2DeploymentResponse: + """Test GetInferenceV2DeploymentResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `GetInferenceDeploymentResponse` + # uncomment below to create an instance of `GetInferenceV2DeploymentResponse` """ - model = GetInferenceDeploymentResponse() + model = GetInferenceV2DeploymentResponse() if include_optional: - return GetInferenceDeploymentResponse( + return GetInferenceV2DeploymentResponse( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, - endpoint_url = '', + container_port = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, + healthcheck = '', + endpoint_certificate_authority = '', env_vars = { 'key' : '' - }, - port = 56, - min_replicas = 56, - max_replicas = 56, - timeout = 56, - healthcheck = '', - endpoint_certificate_authority = '' + } ) else: - return GetInferenceDeploymentResponse( + return GetInferenceV2DeploymentResponse( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, - endpoint_url = '', + container_port = 56, + min_scale = 56, + max_scale = 56, + concurrency = 56, + healthcheck = '', + endpoint_certificate_authority = '', env_vars = { 'key' : '' }, - port = 56, - min_replicas = 56, - max_replicas = 56, - timeout = 56, - healthcheck = '', - endpoint_certificate_authority = '', ) """ - def testGetInferenceDeploymentResponse(self): - """Test GetInferenceDeploymentResponse""" + def testGetInferenceV2DeploymentResponse(self): + """Test GetInferenceV2DeploymentResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_hardware_instance_response.py b/test/test_hardware_instance_response.py index 244f837..c239355 100644 --- a/test/test_hardware_instance_response.py +++ b/test/test_hardware_instance_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.hardware_instance_response import HardwareInstanceResponse +from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse class TestHardwareInstanceResponse(unittest.TestCase): """HardwareInstanceResponse unit test stubs""" @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> HardwareInstanceResponse: num_gpu = 56, cpu = 56, memory = 56, - cost = 56 + cost_per_hr = 56 ) else: return HardwareInstanceResponse( @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> HardwareInstanceResponse: num_gpu = 56, cpu = 56, memory = 56, - cost = 56, + cost_per_hr = 56, ) """ diff --git a/test/test_endpoint_ready_state.py b/test/test_health_status.py similarity index 62% rename from test/test_endpoint_ready_state.py rename to test/test_health_status.py index df904f9..e2f1b3e 100644 --- a/test/test_endpoint_ready_state.py +++ b/test/test_health_status.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.endpoint_ready_state import EndpointReadyState +from platform_api_python_client.models.health_status import HealthStatus -class TestEndpointReadyState(unittest.TestCase): - """EndpointReadyState unit test stubs""" +class TestHealthStatus(unittest.TestCase): + """HealthStatus unit test stubs""" def setUp(self): pass @@ -25,9 +25,9 @@ def setUp(self): def tearDown(self): pass - def testEndpointReadyState(self): - """Test EndpointReadyState""" - # inst = EndpointReadyState() + def testHealthStatus(self): + """Test HealthStatus""" + # inst = HealthStatus() if __name__ == '__main__': unittest.main() diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py index 31e35c9..4acb059 100644 --- a/test/test_http_validation_error.py +++ b/test/test_http_validation_error.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.http_validation_error import HTTPValidationError +from platform_api_python_client.models.http_validation_error import HTTPValidationError class TestHTTPValidationError(unittest.TestCase): """HTTPValidationError unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> HTTPValidationError: if include_optional: return HTTPValidationError( detail = [ - platform_api_client.models.validation_error.ValidationError( + platform_api_python_client.models.validation_error.ValidationError( loc = [ null ], diff --git a/test/test_list_api_key_response.py b/test/test_list_api_key_response.py new file mode 100644 index 0000000..785d57b --- /dev/null +++ b/test/test_list_api_key_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse + +class TestListAPIKeyResponse(unittest.TestCase): + """ListAPIKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListAPIKeyResponse: + """Test ListAPIKeyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListAPIKeyResponse` + """ + model = ListAPIKeyResponse() + if include_optional: + return ListAPIKeyResponse( + results = [ + platform_api_python_client.models.api_key_response.APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ListAPIKeyResponse( + results = [ + platform_api_python_client.models.api_key_response.APIKeyResponse( + name = '', + id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testListAPIKeyResponse(self): + """Test ListAPIKeyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_c_serve_recipe_response.py b/test/test_list_c_serve_recipe_response.py new file mode 100644 index 0000000..d40a117 --- /dev/null +++ b/test/test_list_c_serve_recipe_response.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse + +class TestListCServeRecipeResponse(unittest.TestCase): + """ListCServeRecipeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListCServeRecipeResponse: + """Test ListCServeRecipeResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListCServeRecipeResponse` + """ + model = ListCServeRecipeResponse() + if include_optional: + return ListCServeRecipeResponse( + results = [ + platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + best_value = , ) + ] + ) + else: + return ListCServeRecipeResponse( + results = [ + platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( + model = '', + cluster_id = 56, + fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( + recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( + model = '', + is_embedding_model = True, + tensor_parallel_size = 56, + pipeline_parallel_size = 56, + block_size = 56, + swap_space = 0.0, + gpu_mem_util = 0.0, + max_num_seqs = 56, + use_prefix_caching = True, + offloading_num = 56, + use_flashinfer = True, + max_model_len = 128.0, + dtype = 'auto', + tokenizer = '', + spec_proposer = '', + spec_draft_model = '', + spec_tokens = 56, + spec_prompt_lookup_min = 1.0, + spec_prompt_lookup_max = 1.0, + seed = 56, ), + hardware_instance_id = 56, + output_tp = [ + [ + '' + ] + ], + mean_ttft = [ + [ + '' + ] + ], ), + best_value = , ) + ], + ) + """ + + def testListCServeRecipeResponse(self): + """Test ListCServeRecipeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_daily_bill_response.py b/test/test_list_daily_bill_response.py new file mode 100644 index 0000000..e386648 --- /dev/null +++ b/test/test_list_daily_bill_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse + +class TestListDailyBillResponse(unittest.TestCase): + """ListDailyBillResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDailyBillResponse: + """Test ListDailyBillResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListDailyBillResponse` + """ + model = ListDailyBillResponse() + if include_optional: + return ListDailyBillResponse( + results = [ + platform_api_python_client.models.daily_bill_response.DailyBillResponse( + date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 56, ) + ] + ) + else: + return ListDailyBillResponse( + results = [ + platform_api_python_client.models.daily_bill_response.DailyBillResponse( + date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + credits = 56, ) + ], + ) + """ + + def testListDailyBillResponse(self): + """Test ListDailyBillResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_get_cluster_response.py b/test/test_list_get_cluster_response.py new file mode 100644 index 0000000..2a80d8e --- /dev/null +++ b/test/test_list_get_cluster_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse + +class TestListGetClusterResponse(unittest.TestCase): + """ListGetClusterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGetClusterResponse: + """Test ListGetClusterResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGetClusterResponse` + """ + model = ListGetClusterResponse() + if include_optional: + return ListGetClusterResponse( + results = [ + platform_api_python_client.models.get_cluster_response.GetClusterResponse( + id = 56, + display_name = '', ) + ] + ) + else: + return ListGetClusterResponse( + results = [ + platform_api_python_client.models.get_cluster_response.GetClusterResponse( + id = 56, + display_name = '', ) + ], + ) + """ + + def testListGetClusterResponse(self): + """Test ListGetClusterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_get_deployment_response.py b/test/test_list_get_deployment_v2_response.py similarity index 66% rename from test/test_list_get_deployment_response.py rename to test/test_list_get_deployment_v2_response.py index af433d6..03f4a74 100644 --- a/test/test_list_get_deployment_response.py +++ b/test/test_list_get_deployment_v2_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_client.models.list_get_deployment_response import ListGetDeploymentResponse +from platform_api_python_client.models.list_get_deployment_v2_response import ListGetDeploymentV2Response -class TestListGetDeploymentResponse(unittest.TestCase): - """ListGetDeploymentResponse unit test stubs""" +class TestListGetDeploymentV2Response(unittest.TestCase): + """ListGetDeploymentV2Response unit test stubs""" def setUp(self): pass @@ -25,20 +25,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ListGetDeploymentResponse: - """Test ListGetDeploymentResponse + def make_instance(self, include_optional) -> ListGetDeploymentV2Response: + """Test ListGetDeploymentV2Response include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ListGetDeploymentResponse` + # uncomment below to create an instance of `ListGetDeploymentV2Response` """ - model = ListGetDeploymentResponse() + model = ListGetDeploymentV2Response() if include_optional: - return ListGetDeploymentResponse( + return ListGetDeploymentV2Response( results = [ - platform_api_client.models.get_deployment_response.GetDeploymentResponse( + platform_api_python_client.models.get_deployment_v2_response.GetDeploymentV2Response( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', @@ -47,11 +49,13 @@ def make_instance(self, include_optional) -> ListGetDeploymentResponse: ] ) else: - return ListGetDeploymentResponse( + return ListGetDeploymentV2Response( results = [ - platform_api_client.models.get_deployment_response.GetDeploymentResponse( + platform_api_python_client.models.get_deployment_v2_response.GetDeploymentV2Response( + cluster_id = 56, id = 56, name = '', + endpoint_url = '', image_url = '', type = 'inference', status = 'active', @@ -61,8 +65,8 @@ def make_instance(self, include_optional) -> ListGetDeploymentResponse: ) """ - def testListGetDeploymentResponse(self): - """Test ListGetDeploymentResponse""" + def testListGetDeploymentV2Response(self): + """Test ListGetDeploymentV2Response""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_list_hardware_instance_response.py b/test/test_list_hardware_instance_response.py index b60eb31..dade207 100644 --- a/test/test_list_hardware_instance_response.py +++ b/test/test_list_hardware_instance_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse class TestListHardwareInstanceResponse(unittest.TestCase): """ListHardwareInstanceResponse unit test stubs""" @@ -36,27 +36,27 @@ def make_instance(self, include_optional) -> ListHardwareInstanceResponse: if include_optional: return ListHardwareInstanceResponse( results = [ - platform_api_client.models.hardware_instance_response.HardwareInstanceResponse( + platform_api_python_client.models.hardware_instance_response.HardwareInstanceResponse( id = 56, name = '', gpu_type = '', num_gpu = 56, cpu = 56, memory = 56, - cost = 56, ) + cost_per_hr = 56, ) ] ) else: return ListHardwareInstanceResponse( results = [ - platform_api_client.models.hardware_instance_response.HardwareInstanceResponse( + platform_api_python_client.models.hardware_instance_response.HardwareInstanceResponse( id = 56, name = '', gpu_type = '', num_gpu = 56, cpu = 56, memory = 56, - cost = 56, ) + cost_per_hr = 56, ) ], ) """ diff --git a/test/test_list_payment_method_response.py b/test/test_list_payment_method_response.py index 4398210..cd06ee6 100644 --- a/test/test_list_payment_method_response.py +++ b/test/test_list_payment_method_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.list_payment_method_response import ListPaymentMethodResponse +from platform_api_python_client.models.list_payment_method_response import ListPaymentMethodResponse class TestListPaymentMethodResponse(unittest.TestCase): """ListPaymentMethodResponse unit test stubs""" diff --git a/test/test_list_prebuilt_image_response.py b/test/test_list_prebuilt_image_response.py index 43a921f..d13b89b 100644 --- a/test/test_list_prebuilt_image_response.py +++ b/test/test_list_prebuilt_image_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse +from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse class TestListPrebuiltImageResponse(unittest.TestCase): """ListPrebuiltImageResponse unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ListPrebuiltImageResponse: if include_optional: return ListPrebuiltImageResponse( results = [ - platform_api_client.models.prebuilt_image_response.PrebuiltImageResponse( + platform_api_python_client.models.prebuilt_image_response.PrebuiltImageResponse( image_name = '', label = '', tags = [ @@ -48,7 +48,7 @@ def make_instance(self, include_optional) -> ListPrebuiltImageResponse: else: return ListPrebuiltImageResponse( results = [ - platform_api_client.models.prebuilt_image_response.PrebuiltImageResponse( + platform_api_python_client.models.prebuilt_image_response.PrebuiltImageResponse( image_name = '', label = '', tags = [ diff --git a/test/test_metric.py b/test/test_metric.py new file mode 100644 index 0000000..3708260 --- /dev/null +++ b/test/test_metric.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.metric import Metric + +class TestMetric(unittest.TestCase): + """Metric unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetric(self): + """Test Metric""" + # inst = Metric() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_prebuilt_image_response.py b/test/test_prebuilt_image_response.py index aeb55e1..b778479 100644 --- a/test/test_prebuilt_image_response.py +++ b/test/test_prebuilt_image_response.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.prebuilt_image_response import PrebuiltImageResponse +from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse class TestPrebuiltImageResponse(unittest.TestCase): """PrebuiltImageResponse unit test stubs""" diff --git a/test/test_validation_error.py b/test/test_validation_error.py index d5bc75a..9b6e93f 100644 --- a/test/test_validation_error.py +++ b/test/test_validation_error.py @@ -14,7 +14,7 @@ import unittest -from platform_api_client.models.validation_error import ValidationError +from platform_api_python_client.models.validation_error import ValidationError class TestValidationError(unittest.TestCase): """ValidationError unit test stubs""" diff --git a/test/test_validation_error_loc_inner.py b/test/test_validation_error_loc_inner.py new file mode 100644 index 0000000..44ac1cc --- /dev/null +++ b/test/test_validation_error_loc_inner.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner + +class TestValidationErrorLocInner(unittest.TestCase): + """ValidationErrorLocInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorLocInner: + """Test ValidationErrorLocInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorLocInner` + """ + model = ValidationErrorLocInner() + if include_optional: + return ValidationErrorLocInner( + ) + else: + return ValidationErrorLocInner( + ) + """ + + def testValidationErrorLocInner(self): + """Test ValidationErrorLocInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini index ac3479b..2d64392 100644 --- a/tox.ini +++ b/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest --cov=platform_api_client + pytest --cov=platform_api_python_client