diff --git a/README.md b/README.md index 2a924a3..39b5704 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.13 +- Package version: 4.0.14 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -99,6 +99,7 @@ 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_cserve_v2_deployment_deployments_cserve_v2_post**](docs/EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment *EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +*EXTERNALApi* | [**create_new_organization_organizations_post**](docs/EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization *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 @@ -152,6 +153,8 @@ Class | Method | HTTP request | Description - [CreateComputeDeploymentResponse](docs/CreateComputeDeploymentResponse.md) - [CreateInferenceDeploymentRequest](docs/CreateInferenceDeploymentRequest.md) - [CreateInferenceDeploymentResponse](docs/CreateInferenceDeploymentResponse.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [CreateOrganizationResponse](docs/CreateOrganizationResponse.md) - [CreateRagDeploymentRequest](docs/CreateRagDeploymentRequest.md) - [CreateRagDeploymentResponse](docs/CreateRagDeploymentResponse.md) - [CreateSetupCheckoutRequest](docs/CreateSetupCheckoutRequest.md) @@ -191,7 +194,6 @@ Class | Method | HTTP request | Description - [PodStatus](docs/PodStatus.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) - [ServiceStatus](docs/ServiceStatus.md) - - [SetupUserResponse](docs/SetupUserResponse.md) - [TicketCategory](docs/TicketCategory.md) - [TicketPriority](docs/TicketPriority.md) - [UpdateAutochargePreferencesRequest](docs/UpdateAutochargePreferencesRequest.md) diff --git a/docs/CreateOrganizationRequest.md b/docs/CreateOrganizationRequest.md new file mode 100644 index 0000000..2a74d83 --- /dev/null +++ b/docs/CreateOrganizationRequest.md @@ -0,0 +1,29 @@ +# CreateOrganizationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganizationRequest from a JSON string +create_organization_request_instance = CreateOrganizationRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrganizationRequest.to_json()) + +# convert the object into a dict +create_organization_request_dict = create_organization_request_instance.to_dict() +# create an instance of CreateOrganizationRequest from a dict +create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_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/CreateOrganizationResponse.md b/docs/CreateOrganizationResponse.md new file mode 100644 index 0000000..0e2ff23 --- /dev/null +++ b/docs/CreateOrganizationResponse.md @@ -0,0 +1,30 @@ +# CreateOrganizationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganizationResponse from a JSON string +create_organization_response_instance = CreateOrganizationResponse.from_json(json) +# print the JSON string representation of the object +print(CreateOrganizationResponse.to_json()) + +# convert the object into a dict +create_organization_response_dict = create_organization_response_instance.to_dict() +# create an instance of CreateOrganizationResponse from a dict +create_organization_response_from_dict = CreateOrganizationResponse.from_dict(create_organization_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index c80ca09..64de947 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -9,6 +9,7 @@ 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_cserve_v2_deployment_deployments_cserve_v2_post**](EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment [**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment +[**create_new_organization_organizations_post**](EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization [**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 @@ -437,6 +438,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_new_organization_organizations_post** +> CreateOrganizationResponse create_new_organization_organizations_post(create_organization_request) + +Create New Organization + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest +from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse +from platform_api_python_client.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_organization_request = platform_api_python_client.CreateOrganizationRequest() # CreateOrganizationRequest | + + try: + # Create New Organization + api_response = api_instance.create_new_organization_organizations_post(create_organization_request) + print("The response of EXTERNALApi->create_new_organization_organizations_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->create_new_organization_organizations_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_organization_request** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | + +### Return type + +[**CreateOrganizationResponse**](CreateOrganizationResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_rag_deployment_deployments_rag_post** > CreateRagDeploymentResponse create_rag_deployment_deployments_rag_post(create_rag_deployment_request) @@ -2522,7 +2601,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **setup_stripe_customer_payments_setup_post** -> SetupUserResponse setup_stripe_customer_payments_setup_post() +> object setup_stripe_customer_payments_setup_post() Setup Stripe Customer @@ -2532,7 +2611,6 @@ Setup Stripe Customer ```python import platform_api_python_client -from platform_api_python_client.models.setup_user_response import SetupUserResponse from platform_api_python_client.rest import ApiException from pprint import pprint @@ -2574,7 +2652,7 @@ This endpoint does not need any parameter. ### Return type -[**SetupUserResponse**](SetupUserResponse.md) +**object** ### Authorization diff --git a/docs/SetupUserResponse.md b/docs/SetupUserResponse.md deleted file mode 100644 index 2a23429..0000000 --- a/docs/SetupUserResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# SetupUserResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_workos_organization_id** | **str** | | - -## Example - -```python -from platform_api_python_client.models.setup_user_response import SetupUserResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of SetupUserResponse from a JSON string -setup_user_response_instance = SetupUserResponse.from_json(json) -# print the JSON string representation of the object -print(SetupUserResponse.to_json()) - -# convert the object into a dict -setup_user_response_dict = setup_user_response_instance.to_dict() -# create an instance of SetupUserResponse from a dict -setup_user_response_from_dict = SetupUserResponse.from_dict(setup_user_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index f906a70..d68b3f3 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.0.13" +__version__ = "4.0.14" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -44,6 +44,8 @@ from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest +from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest @@ -83,7 +85,6 @@ 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.setup_user_response import SetupUserResponse 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 diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 86e1834..e8a7388 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -29,6 +29,8 @@ from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest +from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest @@ -56,7 +58,6 @@ 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.setup_user_response import SetupUserResponse 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 @@ -1452,6 +1453,280 @@ def _create_inference_deployment_deployments_inference_post_serialize( + @validate_call + def create_new_organization_organizations_post( + self, + create_organization_request: CreateOrganizationRequest, + _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, + ) -> CreateOrganizationResponse: + """Create New Organization + + + :param create_organization_request: (required) + :type create_organization_request: CreateOrganizationRequest + :param _request_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_new_organization_organizations_post_serialize( + create_organization_request=create_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationResponse", + '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_new_organization_organizations_post_with_http_info( + self, + create_organization_request: CreateOrganizationRequest, + _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[CreateOrganizationResponse]: + """Create New Organization + + + :param create_organization_request: (required) + :type create_organization_request: CreateOrganizationRequest + :param _request_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_new_organization_organizations_post_serialize( + create_organization_request=create_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationResponse", + '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_new_organization_organizations_post_without_preload_content( + self, + create_organization_request: CreateOrganizationRequest, + _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 New Organization + + + :param create_organization_request: (required) + :type create_organization_request: CreateOrganizationRequest + :param _request_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_new_organization_organizations_post_serialize( + create_organization_request=create_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_new_organization_organizations_post_serialize( + self, + create_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_organization_request is not None: + _body_params = create_organization_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='/organizations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def create_rag_deployment_deployments_rag_post( self, @@ -8771,7 +9046,7 @@ def setup_stripe_customer_payments_setup_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SetupUserResponse: + ) -> object: """Setup Stripe Customer @@ -8805,7 +9080,7 @@ def setup_stripe_customer_payments_setup_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SetupUserResponse", + '200': "object", } response_data = self.api_client.call_api( *_param, @@ -8833,7 +9108,7 @@ def setup_stripe_customer_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[SetupUserResponse]: + ) -> ApiResponse[object]: """Setup Stripe Customer @@ -8867,7 +9142,7 @@ def setup_stripe_customer_payments_setup_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SetupUserResponse", + '200': "object", } response_data = self.api_client.call_api( *_param, @@ -8929,7 +9204,7 @@ def setup_stripe_customer_payments_setup_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SetupUserResponse", + '200': "object", } response_data = self.api_client.call_api( *_param, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 3f3df54..16775d6 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.13/python' + self.user_agent = 'OpenAPI-Generator/4.0.14/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 34429a7..7556677 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.13".\ + "SDK Package Version: 4.0.14".\ 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 d0ea2b7..87d9777 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -27,6 +27,8 @@ from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse from platform_api_python_client.models.create_inference_deployment_request import CreateInferenceDeploymentRequest from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest +from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest @@ -66,7 +68,6 @@ 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.setup_user_response import SetupUserResponse 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 diff --git a/platform_api_python_client/models/setup_user_response.py b/platform_api_python_client/models/create_organization_request.py similarity index 73% rename from platform_api_python_client/models/setup_user_response.py rename to platform_api_python_client/models/create_organization_request.py index 086b5b0..ebc3c34 100644 --- a/platform_api_python_client/models/setup_user_response.py +++ b/platform_api_python_client/models/create_organization_request.py @@ -18,16 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class SetupUserResponse(BaseModel): +class CreateOrganizationRequest(BaseModel): """ - SetupUserResponse + CreateOrganizationRequest """ # noqa: E501 - created_workos_organization_id: Optional[StrictStr] - __properties: ClassVar[List[str]] = ["created_workos_organization_id"] + name: StrictStr + __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SetupUserResponse from a JSON string""" + """Create an instance of CreateOrganizationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -68,16 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if created_workos_organization_id (nullable) is None - # and model_fields_set contains the field - if self.created_workos_organization_id is None and "created_workos_organization_id" in self.model_fields_set: - _dict['created_workos_organization_id'] = None - return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SetupUserResponse from a dict""" + """Create an instance of CreateOrganizationRequest from a dict""" if obj is None: return None @@ -85,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "created_workos_organization_id": obj.get("created_workos_organization_id") + "name": obj.get("name") }) return _obj diff --git a/platform_api_python_client/models/create_organization_response.py b/platform_api_python_client/models/create_organization_response.py new file mode 100644 index 0000000..7d48c88 --- /dev/null +++ b/platform_api_python_client/models/create_organization_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganizationResponse(BaseModel): + """ + CreateOrganizationResponse + """ # noqa: E501 + id: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "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 CreateOrganizationResponse 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 CreateOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index d8cf957..892e116 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.0.13" +version = "4.0.14" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 1fb9f6e..390aadb 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.13" +VERSION = "4.0.14" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_setup_user_response.py b/test/test_create_organization_request.py similarity index 56% rename from test/test_setup_user_response.py rename to test/test_create_organization_request.py index e5e4705..05e50d9 100644 --- a/test/test_setup_user_response.py +++ b/test/test_create_organization_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.setup_user_response import SetupUserResponse +from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest -class TestSetupUserResponse(unittest.TestCase): - """SetupUserResponse unit test stubs""" +class TestCreateOrganizationRequest(unittest.TestCase): + """CreateOrganizationRequest unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SetupUserResponse: - """Test SetupUserResponse + def make_instance(self, include_optional) -> CreateOrganizationRequest: + """Test CreateOrganizationRequest 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 `SetupUserResponse` + # uncomment below to create an instance of `CreateOrganizationRequest` """ - model = SetupUserResponse() + model = CreateOrganizationRequest() if include_optional: - return SetupUserResponse( - created_workos_organization_id = '' + return CreateOrganizationRequest( + name = '' ) else: - return SetupUserResponse( - created_workos_organization_id = '', + return CreateOrganizationRequest( + name = '', ) """ - def testSetupUserResponse(self): - """Test SetupUserResponse""" + def testCreateOrganizationRequest(self): + """Test CreateOrganizationRequest""" # 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_organization_response.py b/test/test_create_organization_response.py new file mode 100644 index 0000000..6ab655a --- /dev/null +++ b/test/test_create_organization_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.create_organization_response import CreateOrganizationResponse + +class TestCreateOrganizationResponse(unittest.TestCase): + """CreateOrganizationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganizationResponse: + """Test CreateOrganizationResponse + 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 `CreateOrganizationResponse` + """ + model = CreateOrganizationResponse() + if include_optional: + return CreateOrganizationResponse( + id = '', + name = '' + ) + else: + return CreateOrganizationResponse( + id = '', + name = '', + ) + """ + + def testCreateOrganizationResponse(self): + """Test CreateOrganizationResponse""" + # 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 49e47cb..6e354fc 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -61,6 +61,13 @@ def test_create_inference_deployment_deployments_inference_post(self) -> None: """ pass + def test_create_new_organization_organizations_post(self) -> None: + """Test case for create_new_organization_organizations_post + + Create New Organization + """ + pass + def test_create_rag_deployment_deployments_rag_post(self) -> None: """Test case for create_rag_deployment_deployments_rag_post