diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 79e701b..0456d8e 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -1 +1,11 @@ # Unreleased + +This release updates the Python API generated from file `openapi.json`. + +Changes to `open-api.json` in detail: +* renamed `components` / `schemas` / `ClusterSize` to `ClusterSize1` +* added `components` / `schemas` / `ClusterSize1` / `properties` / `family` + +## Refactorings + +* #97: Updated open API client diff --git a/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py b/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py index 2499150..8c1ab5e 100644 --- a/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py +++ b/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py @@ -13,7 +13,7 @@ AuthenticatedClient, Client, ) -from ...models.cluster_size import ClusterSize +from ...models.cluster_size_1 import ClusterSize1 from ...types import ( UNSET, Response, @@ -34,12 +34,12 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[list["ClusterSize"]]: +) -> Optional[list["ClusterSize1"]]: if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: - response_200_item = ClusterSize.from_dict(response_200_item_data) + response_200_item = ClusterSize1.from_dict(response_200_item_data) response_200.append(response_200_item) @@ -52,7 +52,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[list["ClusterSize"]]: +) -> Response[list["ClusterSize1"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,7 +65,7 @@ def sync_detailed( platform: str, *, client: AuthenticatedClient, -) -> Response[list["ClusterSize"]]: +) -> Response[list["ClusterSize1"]]: """ Args: platform (str): @@ -75,7 +75,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list['ClusterSize']] + Response[list['ClusterSize1']] """ kwargs = _get_kwargs( @@ -93,7 +93,7 @@ def sync( platform: str, *, client: AuthenticatedClient, -) -> Optional[list["ClusterSize"]]: +) -> Optional[list["ClusterSize1"]]: """ Args: platform (str): @@ -103,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list['ClusterSize'] + list['ClusterSize1'] """ return sync_detailed( @@ -116,7 +116,7 @@ async def asyncio_detailed( platform: str, *, client: AuthenticatedClient, -) -> Response[list["ClusterSize"]]: +) -> Response[list["ClusterSize1"]]: """ Args: platform (str): @@ -126,7 +126,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list['ClusterSize']] + Response[list['ClusterSize1']] """ kwargs = _get_kwargs( @@ -142,7 +142,7 @@ async def asyncio( platform: str, *, client: AuthenticatedClient, -) -> Optional[list["ClusterSize"]]: +) -> Optional[list["ClusterSize1"]]: """ Args: platform (str): @@ -152,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list['ClusterSize'] + list['ClusterSize1'] """ return ( diff --git a/exasol/saas/client/openapi/models/__init__.py b/exasol/saas/client/openapi/models/__init__.py index 0caf673..d8d2feb 100644 --- a/exasol/saas/client/openapi/models/__init__.py +++ b/exasol/saas/client/openapi/models/__init__.py @@ -9,7 +9,7 @@ from .cluster_connection import ClusterConnection from .cluster_settings import ClusterSettings from .cluster_settings_update import ClusterSettingsUpdate -from .cluster_size import ClusterSize +from .cluster_size_1 import ClusterSize1 from .connection_i_ps import ConnectionIPs from .create_allowed_ip import CreateAllowedIP from .create_cluster import CreateCluster @@ -63,7 +63,7 @@ "ClusterConnection", "ClusterSettings", "ClusterSettingsUpdate", - "ClusterSize", + "ClusterSize1", "ConnectionIPs", "CreateAllowedIP", "CreateCluster", diff --git a/exasol/saas/client/openapi/models/cluster_size.py b/exasol/saas/client/openapi/models/cluster_size_1.py similarity index 80% rename from exasol/saas/client/openapi/models/cluster_size.py rename to exasol/saas/client/openapi/models/cluster_size_1.py index c59f73e..5767c61 100644 --- a/exasol/saas/client/openapi/models/cluster_size.py +++ b/exasol/saas/client/openapi/models/cluster_size_1.py @@ -6,6 +6,7 @@ Optional, TextIO, TypeVar, + Union, ) from attrs import define as _attrs_define @@ -16,11 +17,11 @@ Unset, ) -T = TypeVar("T", bound="ClusterSize") +T = TypeVar("T", bound="ClusterSize1") @_attrs_define -class ClusterSize: +class ClusterSize1: """ Attributes: size (str): @@ -29,6 +30,7 @@ class ClusterSize: ram (float): is_default (bool): name (str): + family (Union[Unset, str]): """ size: str @@ -37,6 +39,7 @@ class ClusterSize: ram: float is_default: bool name: str + family: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: size = self.size @@ -51,6 +54,8 @@ def to_dict(self) -> dict[str, Any]: name = self.name + family = self.family + field_dict: dict[str, Any] = {} field_dict.update( { @@ -62,6 +67,8 @@ def to_dict(self) -> dict[str, Any]: "name": name, } ) + if family is not UNSET: + field_dict["family"] = family return field_dict @@ -80,13 +87,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") - cluster_size = cls( + family = d.pop("family", UNSET) + + cluster_size_1 = cls( size=size, price=price, vcpu=vcpu, ram=ram, is_default=is_default, name=name, + family=family, ) - return cluster_size + return cluster_size_1 diff --git a/openapi.json b/openapi.json index e039275..eeabb2a 100644 --- a/openapi.json +++ b/openapi.json @@ -6,7 +6,7 @@ "version": "1.0", "download": { "source": "https://cloud.exasol.com/openapi.json", - "timestamp": "2025-05-05T14:28:43.300548+00:00" + "timestamp": "2025-05-16T07:11:47.085448+00:00" } }, "servers": [ @@ -2278,7 +2278,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ClusterSize" + "$ref": "#/components/schemas/ClusterSize1" } } } @@ -3068,38 +3068,6 @@ "additionalProperties": false, "type": "object" }, - "ClusterSize": { - "required": [ - "size", - "price", - "vcpu", - "ram", - "isDefault", - "name" - ], - "properties": { - "size": { - "type": "string" - }, - "price": { - "type": "number" - }, - "vcpu": { - "type": "number" - }, - "ram": { - "type": "number" - }, - "isDefault": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "type": "object" - }, "ConnectionIPs": { "required": [ "private", @@ -3711,6 +3679,41 @@ "additionalProperties": false, "type": "object" }, + "ClusterSize1": { + "required": [ + "size", + "price", + "vcpu", + "ram", + "isDefault", + "name" + ], + "properties": { + "size": { + "type": "string" + }, + "price": { + "type": "number" + }, + "vcpu": { + "type": "number" + }, + "ram": { + "type": "number" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "family": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "Platform": { "required": [ "id",