diff --git a/README.md b/README.md index fe56835..1d540f4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 -- Package version: 4.0.1 +- Package version: 4.0.2 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -76,15 +76,15 @@ configuration = platform_api_python_client.Configuration( with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) - user_support_email_request = platform_api_python_client.UserSupportEmailRequest() # UserSupportEmailRequest | + api_key_request = platform_api_python_client.APIKeyRequest() # APIKeyRequest | try: - # Add User Request - api_response = api_instance.add_user_request_support_user_requests_post(user_support_email_request) - print("The response of EXTERNALApi->add_user_request_support_user_requests_post:\n") + # 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 ApiException as e: - print("Exception when calling EXTERNALApi->add_user_request_support_user_requests_post: %s\n" % e) + print("Exception when calling EXTERNALApi->create_api_key_credentials_api_key_post: %s\n" % e) ``` @@ -94,7 +94,6 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*EXTERNALApi* | [**add_user_request_support_user_requests_post**](docs/EXTERNALApi.md#add_user_request_support_user_requests_post) | **POST** /support/user-requests | Add User Request *EXTERNALApi* | [**create_api_key_credentials_api_key_post**](docs/EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key *EXTERNALApi* | [**create_checkout_payments_checkout_post**](docs/EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout *EXTERNALApi* | [**create_compute_deployment_deployments_compute_post**](docs/EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment @@ -103,6 +102,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment *EXTERNALApi* | [**create_rag_deployment_deployments_rag_post**](docs/EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment *EXTERNALApi* | [**create_setup_payments_setup_checkout_post**](docs/EXTERNALApi.md#create_setup_payments_setup_checkout_post) | **POST** /payments/setup_checkout | Create Setup +*EXTERNALApi* | [**create_support_ticket_support_post**](docs/EXTERNALApi.md#create_support_ticket_support_post) | **POST** /support | Create Support Ticket *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_autocharge_preferences_autocharge_preferences_delete**](docs/EXTERNALApi.md#delete_autocharge_preferences_autocharge_preferences_delete) | **DELETE** /autocharge/preferences | Delete Autocharge Preferences *EXTERNALApi* | [**delete_payment_method_payments_methods_delete**](docs/EXTERNALApi.md#delete_payment_method_payments_methods_delete) | **DELETE** /payments/methods | Delete Payment Method @@ -196,9 +196,10 @@ Class | Method | HTTP request | Description - [PodStatus](docs/PodStatus.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) - [ServiceStatus](docs/ServiceStatus.md) + - [TicketCategory](docs/TicketCategory.md) + - [TicketPriority](docs/TicketPriority.md) - [UpdateAutochargePreferencesRequest](docs/UpdateAutochargePreferencesRequest.md) - [UpdateDeploymentResponse](docs/UpdateDeploymentResponse.md) - - [UserSupportEmailRequest](docs/UserSupportEmailRequest.md) - [UserVaultItem](docs/UserVaultItem.md) - [UserVaultType](docs/UserVaultType.md) - [ValidationError](docs/ValidationError.md) diff --git a/docs/CServeRecipe.md b/docs/CServeRecipe.md index 9678dcc..f2c63e9 100644 --- a/docs/CServeRecipe.md +++ b/docs/CServeRecipe.md @@ -7,6 +7,7 @@ Base class for deployment planner Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | +**revision** | **str** | | [optional] **is_embedding_model** | **bool** | | [optional] [default to False] **tensor_parallel_size** | **int** | | **pipeline_parallel_size** | **int** | | diff --git a/docs/CServeV2Recipe.md b/docs/CServeV2Recipe.md index 733c995..a37d22d 100644 --- a/docs/CServeV2Recipe.md +++ b/docs/CServeV2Recipe.md @@ -7,6 +7,7 @@ Inputs to start deployment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | +**revision** | **str** | | [optional] **is_embedding_model** | **bool** | | [optional] [default to False] ## Example diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index c19e1f5..9cf1fb1 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -4,7 +4,6 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**add_user_request_support_user_requests_post**](EXTERNALApi.md#add_user_request_support_user_requests_post) | **POST** /support/user-requests | Add User Request [**create_api_key_credentials_api_key_post**](EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key [**create_checkout_payments_checkout_post**](EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout [**create_compute_deployment_deployments_compute_post**](EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment @@ -13,6 +12,7 @@ Method | HTTP request | Description [**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment [**create_rag_deployment_deployments_rag_post**](EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment [**create_setup_payments_setup_checkout_post**](EXTERNALApi.md#create_setup_payments_setup_checkout_post) | **POST** /payments/setup_checkout | Create Setup +[**create_support_ticket_support_post**](EXTERNALApi.md#create_support_ticket_support_post) | **POST** /support | Create Support Ticket [**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_autocharge_preferences_autocharge_preferences_delete**](EXTERNALApi.md#delete_autocharge_preferences_autocharge_preferences_delete) | **DELETE** /autocharge/preferences | Delete Autocharge Preferences [**delete_payment_method_payments_methods_delete**](EXTERNALApi.md#delete_payment_method_payments_methods_delete) | **DELETE** /payments/methods | Delete Payment Method @@ -49,83 +49,6 @@ Method | HTTP request | Description [**upload_url_file_url_upload_post**](EXTERNALApi.md#upload_url_file_url_upload_post) | **POST** /file_url/upload | Upload Url -# **add_user_request_support_user_requests_post** -> object add_user_request_support_user_requests_post(user_support_email_request) - -Add User Request - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest -from platform_api_python_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_python_client.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: HTTPBearer -configuration = platform_api_python_client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with platform_api_python_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = platform_api_python_client.EXTERNALApi(api_client) - user_support_email_request = platform_api_python_client.UserSupportEmailRequest() # UserSupportEmailRequest | - - try: - # Add User Request - api_response = api_instance.add_user_request_support_user_requests_post(user_support_email_request) - print("The response of EXTERNALApi->add_user_request_support_user_requests_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->add_user_request_support_user_requests_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_support_email_request** | [**UserSupportEmailRequest**](UserSupportEmailRequest.md)| | - -### Return type - -**object** - -### Authorization - -[HTTPBearer](../README.md#HTTPBearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Validation Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **create_api_key_credentials_api_key_post** > APIKeyResponse create_api_key_credentials_api_key_post(api_key_request) @@ -750,6 +673,90 @@ 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_support_ticket_support_post** +> object create_support_ticket_support_post(message, category, priority, upload_file=upload_file) + +Create Support Ticket + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.ticket_category import TicketCategory +from platform_api_python_client.models.ticket_priority import TicketPriority +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) + message = 'message_example' # str | + category = platform_api_python_client.TicketCategory() # TicketCategory | + priority = platform_api_python_client.TicketPriority() # TicketPriority | + upload_file = None # bytearray | (optional) + + try: + # Create Support Ticket + api_response = api_instance.create_support_ticket_support_post(message, category, priority, upload_file=upload_file) + print("The response of EXTERNALApi->create_support_ticket_support_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_support_ticket_support_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **message** | **str**| | + **category** | [**TicketCategory**](TicketCategory.md)| | + **priority** | [**TicketPriority**](TicketPriority.md)| | + **upload_file** | **bytearray**| | [optional] + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_api_key_credentials_api_key_id_delete** > object delete_api_key_credentials_api_key_id_delete(id) diff --git a/docs/GetCServeDeploymentResponse.md b/docs/GetCServeDeploymentResponse.md index 561a0b7..fd0e924 100644 --- a/docs/GetCServeDeploymentResponse.md +++ b/docs/GetCServeDeploymentResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | +**revision** | **str** | | [optional] **is_embedding_model** | **bool** | | [optional] [default to False] **tensor_parallel_size** | **int** | | **pipeline_parallel_size** | **int** | | diff --git a/docs/Metric.md b/docs/Metric.md index 52c4312..903c347 100644 --- a/docs/Metric.md +++ b/docs/Metric.md @@ -9,6 +9,14 @@ * `GPU` (value: `'gpu'`) +* `HTTP_REQUESTS` (value: `'http_requests'`) + +* `REQUEST_LATENCY_50_PERCENTILE` (value: `'request_latency_50_percentile'`) + +* `REQUEST_LATENCY_90_PERCENTILE` (value: `'request_latency_90_percentile'`) + +* `REQUEST_LATENCY_99_PERCENTILE` (value: `'request_latency_99_percentile'`) + [[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/TicketCategory.md b/docs/TicketCategory.md new file mode 100644 index 0000000..6895670 --- /dev/null +++ b/docs/TicketCategory.md @@ -0,0 +1,24 @@ +# TicketCategory + + +## Enum + +* `GENERAL_QUESTIONS` (value: `'general_questions'`) + +* `SALES_QUESTIONS` (value: `'sales_questions'`) + +* `PERFORMANCE_QUESTIONS` (value: `'performance_questions'`) + +* `BILLING_AND_FINANCE` (value: `'billing_and_finance'`) + +* `DATA_PRIVACY_ACCOUNT_DELETION` (value: `'data_privacy_account_deletion'`) + +* `ADD_A_NEW_CLUSTER` (value: `'add_a_new_cluster'`) + +* `REQUEST_A_NEW_SERVERLESS_MODEL` (value: `'request_a_new_serverless_model'`) + +* `OTHER` (value: `'other'`) + +[[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/TicketPriority.md b/docs/TicketPriority.md new file mode 100644 index 0000000..b3c09d8 --- /dev/null +++ b/docs/TicketPriority.md @@ -0,0 +1,16 @@ +# TicketPriority + + +## Enum + +* `URGENT` (value: `'urgent'`) + +* `HIGH` (value: `'high'`) + +* `NORMAL` (value: `'normal'`) + +* `LOW` (value: `'low'`) + +[[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/UserSupportEmailRequest.md b/docs/UserSupportEmailRequest.md deleted file mode 100644 index bb87b94..0000000 --- a/docs/UserSupportEmailRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UserSupportEmailRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | -**subject** | **str** | | -**send_to_sales** | **bool** | | - -## Example - -```python -from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UserSupportEmailRequest from a JSON string -user_support_email_request_instance = UserSupportEmailRequest.from_json(json) -# print the JSON string representation of the object -print(UserSupportEmailRequest.to_json()) - -# convert the object into a dict -user_support_email_request_dict = user_support_email_request_instance.to_dict() -# create an instance of UserSupportEmailRequest from a dict -user_support_email_request_from_dict = UserSupportEmailRequest.from_dict(user_support_email_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 1d20f4a..33f2fe3 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.0.1" +__version__ = "4.0.2" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -86,9 +86,10 @@ from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.ticket_category import TicketCategory +from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse -from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index dc2f206..61967ef 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -17,8 +17,8 @@ from typing_extensions import Annotated from datetime import date -from pydantic import StrictBool, StrictInt, StrictStr -from typing import Any, Optional +from pydantic import StrictBool, StrictBytes, StrictInt, StrictStr +from typing import Any, Optional, Tuple, Union from platform_api_python_client.models.api_key_request import APIKeyRequest from platform_api_python_client.models.api_key_response import APIKeyResponse from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest @@ -59,9 +59,10 @@ from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.metric import Metric from platform_api_python_client.models.payment_method_response import PaymentMethodResponse +from platform_api_python_client.models.ticket_category import TicketCategory +from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse -from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType @@ -83,280 +84,6 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client - @validate_call - def add_user_request_support_user_requests_post( - self, - user_support_email_request: UserSupportEmailRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Add User Request - - - :param user_support_email_request: (required) - :type user_support_email_request: UserSupportEmailRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._add_user_request_support_user_requests_post_serialize( - user_support_email_request=user_support_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def add_user_request_support_user_requests_post_with_http_info( - self, - user_support_email_request: UserSupportEmailRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Add User Request - - - :param user_support_email_request: (required) - :type user_support_email_request: UserSupportEmailRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._add_user_request_support_user_requests_post_serialize( - user_support_email_request=user_support_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def add_user_request_support_user_requests_post_without_preload_content( - self, - user_support_email_request: UserSupportEmailRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Add User Request - - - :param user_support_email_request: (required) - :type user_support_email_request: UserSupportEmailRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._add_user_request_support_user_requests_post_serialize( - user_support_email_request=user_support_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _add_user_request_support_user_requests_post_serialize( - self, - user_support_email_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_support_email_request is not None: - _body_params = user_support_email_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'HTTPBearer' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/support/user-requests', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def create_api_key_credentials_api_key_post( self, @@ -2549,6 +2276,325 @@ def _create_setup_payments_setup_checkout_post_serialize( + @validate_call + def create_support_ticket_support_post( + self, + message: StrictStr, + category: TicketCategory, + priority: TicketPriority, + upload_file: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = 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, + ) -> object: + """Create Support Ticket + + + :param message: (required) + :type message: str + :param category: (required) + :type category: TicketCategory + :param priority: (required) + :type priority: TicketPriority + :param upload_file: + :type upload_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_support_ticket_support_post_serialize( + message=message, + category=category, + priority=priority, + upload_file=upload_file, + _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 create_support_ticket_support_post_with_http_info( + self, + message: StrictStr, + category: TicketCategory, + priority: TicketPriority, + upload_file: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = 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[object]: + """Create Support Ticket + + + :param message: (required) + :type message: str + :param category: (required) + :type category: TicketCategory + :param priority: (required) + :type priority: TicketPriority + :param upload_file: + :type upload_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_support_ticket_support_post_serialize( + message=message, + category=category, + priority=priority, + upload_file=upload_file, + _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 create_support_ticket_support_post_without_preload_content( + self, + message: StrictStr, + category: TicketCategory, + priority: TicketPriority, + upload_file: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = 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: + """Create Support Ticket + + + :param message: (required) + :type message: str + :param category: (required) + :type category: TicketCategory + :param priority: (required) + :type priority: TicketPriority + :param upload_file: + :type upload_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_support_ticket_support_post_serialize( + message=message, + category=category, + priority=priority, + upload_file=upload_file, + _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 _create_support_ticket_support_post_serialize( + self, + message, + category, + priority, + upload_file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if message is not None: + _form_params.append(('message', message)) + if category is not None: + _form_params.append(('category', category)) + if priority is not None: + _form_params.append(('priority', priority)) + if upload_file is not None: + _files['upload_file'] = upload_file + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/support', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_api_key_credentials_api_key_id_delete( self, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 704b054..c797c9e 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.0.1/python' + self.user_agent = 'OpenAPI-Generator/4.0.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index abf4b9d..9ae0008 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -392,7 +392,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.0.1".\ + "SDK Package Version: 4.0.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index b507e46..d56876a 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -69,9 +69,10 @@ from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.ticket_category import TicketCategory +from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse -from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError diff --git a/platform_api_python_client/models/c_serve_recipe.py b/platform_api_python_client/models/c_serve_recipe.py index 2c9a019..14ed15e 100644 --- a/platform_api_python_client/models/c_serve_recipe.py +++ b/platform_api_python_client/models/c_serve_recipe.py @@ -28,6 +28,7 @@ class CServeRecipe(BaseModel): Base class for deployment planner """ # noqa: E501 model: StrictStr + revision: Optional[StrictStr] = None is_embedding_model: Optional[StrictBool] = False tensor_parallel_size: StrictInt pipeline_parallel_size: StrictInt @@ -51,7 +52,7 @@ class CServeRecipe(BaseModel): spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None seed: Optional[StrictInt] = 0 - __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] + __properties: ClassVar[List[str]] = ["model", "revision", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] @field_validator('block_size') def block_size_validate_enum(cls, value): @@ -122,6 +123,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if revision (nullable) is None + # and model_fields_set contains the field + if self.revision is None and "revision" in self.model_fields_set: + _dict['revision'] = None + # 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: @@ -195,6 +201,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), + "revision": obj.get("revision"), "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"), diff --git a/platform_api_python_client/models/c_serve_v2_recipe.py b/platform_api_python_client/models/c_serve_v2_recipe.py index 405a0f7..9dfbc48 100644 --- a/platform_api_python_client/models/c_serve_v2_recipe.py +++ b/platform_api_python_client/models/c_serve_v2_recipe.py @@ -27,9 +27,10 @@ class CServeV2Recipe(BaseModel): Inputs to start deployment """ # noqa: E501 model: StrictStr + revision: Optional[StrictStr] = None is_embedding_model: Optional[StrictBool] = False additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["model", "is_embedding_model"] + __properties: ClassVar[List[str]] = ["model", "revision", "is_embedding_model"] model_config = ConfigDict( populate_by_name=True, @@ -77,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if revision (nullable) is None + # and model_fields_set contains the field + if self.revision is None and "revision" in self.model_fields_set: + _dict['revision'] = None + return _dict @classmethod @@ -90,6 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), + "revision": obj.get("revision"), "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False }) # store additional fields in additional_properties 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 index 1d4b19b..cdfffaf 100644 --- a/platform_api_python_client/models/get_c_serve_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_deployment_response.py @@ -31,6 +31,7 @@ class GetCServeDeploymentResponse(BaseModel): GetCServeDeploymentResponse """ # noqa: E501 model: StrictStr + revision: Optional[StrictStr] = None is_embedding_model: Optional[StrictBool] = False tensor_parallel_size: StrictInt pipeline_parallel_size: StrictInt @@ -68,7 +69,7 @@ class GetCServeDeploymentResponse(BaseModel): endpoint_certificate_authority: Optional[StrictStr] = None concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + __properties: ClassVar[List[str]] = ["model", "revision", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] @field_validator('block_size') def block_size_validate_enum(cls, value): @@ -139,6 +140,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if revision (nullable) is None + # and model_fields_set contains the field + if self.revision is None and "revision" in self.model_fields_set: + _dict['revision'] = None + # 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: @@ -227,6 +233,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), + "revision": obj.get("revision"), "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"), diff --git a/platform_api_python_client/models/metric.py b/platform_api_python_client/models/metric.py index c5aea27..bd4b8d6 100644 --- a/platform_api_python_client/models/metric.py +++ b/platform_api_python_client/models/metric.py @@ -29,6 +29,10 @@ class Metric(str, Enum): CPU = 'cpu' MEMORY = 'memory' GPU = 'gpu' + HTTP_REQUESTS = 'http_requests' + REQUEST_LATENCY_50_PERCENTILE = 'request_latency_50_percentile' + REQUEST_LATENCY_90_PERCENTILE = 'request_latency_90_percentile' + REQUEST_LATENCY_99_PERCENTILE = 'request_latency_99_percentile' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/platform_api_python_client/models/ticket_category.py b/platform_api_python_client/models/ticket_category.py new file mode 100644 index 0000000..d3a10d9 --- /dev/null +++ b/platform_api_python_client/models/ticket_category.py @@ -0,0 +1,43 @@ +# 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 TicketCategory(str, Enum): + """ + TicketCategory + """ + + """ + allowed enum values + """ + GENERAL_QUESTIONS = 'general_questions' + SALES_QUESTIONS = 'sales_questions' + PERFORMANCE_QUESTIONS = 'performance_questions' + BILLING_AND_FINANCE = 'billing_and_finance' + DATA_PRIVACY_ACCOUNT_DELETION = 'data_privacy_account_deletion' + ADD_A_NEW_CLUSTER = 'add_a_new_cluster' + REQUEST_A_NEW_SERVERLESS_MODEL = 'request_a_new_serverless_model' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TicketCategory from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/ticket_priority.py b/platform_api_python_client/models/ticket_priority.py new file mode 100644 index 0000000..180704a --- /dev/null +++ b/platform_api_python_client/models/ticket_priority.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TicketPriority(str, Enum): + """ + TicketPriority + """ + + """ + allowed enum values + """ + URGENT = 'urgent' + HIGH = 'high' + NORMAL = 'normal' + LOW = 'low' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TicketPriority from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/user_support_email_request.py b/platform_api_python_client/models/user_support_email_request.py deleted file mode 100644 index bf34253..0000000 --- a/platform_api_python_client/models/user_support_email_request.py +++ /dev/null @@ -1,91 +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 pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class UserSupportEmailRequest(BaseModel): - """ - UserSupportEmailRequest - """ # noqa: E501 - message: StrictStr - subject: StrictStr - send_to_sales: StrictBool - __properties: ClassVar[List[str]] = ["message", "subject", "send_to_sales"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserSupportEmailRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserSupportEmailRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message"), - "subject": obj.get("subject"), - "send_to_sales": obj.get("send_to_sales") - }) - return _obj - - diff --git a/pyproject.toml b/pyproject.toml index a27dd70..1cd9f31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.0.1" +version = "4.0.2" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 71a8047..bf745e1 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.0.1" +VERSION = "4.0.2" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_c_serve_recipe.py b/test/test_c_serve_recipe.py index 2928556..e7655e1 100644 --- a/test/test_c_serve_recipe.py +++ b/test/test_c_serve_recipe.py @@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> CServeRecipe: if include_optional: return CServeRecipe( model = '', + revision = '', is_embedding_model = True, tensor_parallel_size = 56, pipeline_parallel_size = 56, diff --git a/test/test_c_serve_v2_recipe.py b/test/test_c_serve_v2_recipe.py index ecb9d06..136bc53 100644 --- a/test/test_c_serve_v2_recipe.py +++ b/test/test_c_serve_v2_recipe.py @@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> CServeV2Recipe: if include_optional: return CServeV2Recipe( model = '', + revision = '', is_embedding_model = True ) else: diff --git a/test/test_create_c_serve_deployment_request.py b/test/test_create_c_serve_deployment_request.py index 66521a3..76702cb 100644 --- a/test/test_create_c_serve_deployment_request.py +++ b/test/test_create_c_serve_deployment_request.py @@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: hardware_instance_id = 56, recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( model = '', + revision = '', is_embedding_model = True, tensor_parallel_size = 56, pipeline_parallel_size = 56, @@ -79,6 +80,7 @@ def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: hardware_instance_id = 56, recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( model = '', + revision = '', is_embedding_model = True, tensor_parallel_size = 56, pipeline_parallel_size = 56, diff --git a/test/test_external_api.py b/test/test_external_api.py index c989a4d..2fb9821 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -26,13 +26,6 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_add_user_request_support_user_requests_post(self) -> None: - """Test case for add_user_request_support_user_requests_post - - Add User Request - """ - pass - def test_create_api_key_credentials_api_key_post(self) -> None: """Test case for create_api_key_credentials_api_key_post @@ -89,6 +82,13 @@ def test_create_setup_payments_setup_checkout_post(self) -> None: """ pass + def test_create_support_ticket_support_post(self) -> None: + """Test case for create_support_ticket_support_post + + Create Support Ticket + """ + pass + def test_delete_api_key_credentials_api_key_id_delete(self) -> None: """Test case for delete_api_key_credentials_api_key_id_delete diff --git a/test/test_get_c_serve_deployment_response.py b/test/test_get_c_serve_deployment_response.py index cfb0aa3..842040f 100644 --- a/test/test_get_c_serve_deployment_response.py +++ b/test/test_get_c_serve_deployment_response.py @@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> GetCServeDeploymentResponse: if include_optional: return GetCServeDeploymentResponse( model = '', + revision = '', is_embedding_model = True, tensor_parallel_size = 56, pipeline_parallel_size = 56, diff --git a/test/test_ticket_category.py b/test/test_ticket_category.py new file mode 100644 index 0000000..d53294a --- /dev/null +++ b/test/test_ticket_category.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.ticket_category import TicketCategory + +class TestTicketCategory(unittest.TestCase): + """TicketCategory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTicketCategory(self): + """Test TicketCategory""" + # inst = TicketCategory() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ticket_priority.py b/test/test_ticket_priority.py new file mode 100644 index 0000000..e534903 --- /dev/null +++ b/test/test_ticket_priority.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.ticket_priority import TicketPriority + +class TestTicketPriority(unittest.TestCase): + """TicketPriority unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTicketPriority(self): + """Test TicketPriority""" + # inst = TicketPriority() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_support_email_request.py b/test/test_user_support_email_request.py deleted file mode 100644 index de221ee..0000000 --- a/test/test_user_support_email_request.py +++ /dev/null @@ -1,56 +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_python_client.models.user_support_email_request import UserSupportEmailRequest - -class TestUserSupportEmailRequest(unittest.TestCase): - """UserSupportEmailRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserSupportEmailRequest: - """Test UserSupportEmailRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserSupportEmailRequest` - """ - model = UserSupportEmailRequest() - if include_optional: - return UserSupportEmailRequest( - message = '', - subject = '', - send_to_sales = True - ) - else: - return UserSupportEmailRequest( - message = '', - subject = '', - send_to_sales = True, - ) - """ - - def testUserSupportEmailRequest(self): - """Test UserSupportEmailRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()