diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 1435744..3f5762b 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [0.2.0](changes_0.2.0.md) * [0.1.0](changes_0.1.0.md) @@ -7,6 +8,7 @@ --- hidden: --- +changes_0.2.0 changes_0.1.0 ``` \ No newline at end of file diff --git a/doc/changes/changes_0.2.0.md b/doc/changes/changes_0.2.0.md new file mode 100644 index 0000000..42e96e4 --- /dev/null +++ b/doc/changes/changes_0.2.0.md @@ -0,0 +1,9 @@ +# Saas API Python 0.2.0, released + +## Summary + +This release updates the API. + +## Features + +* #17: Updated generated API diff --git a/exasol/saas/client/openapi/api/clusters/create_cluster.py b/exasol/saas/client/openapi/api/clusters/create_cluster.py index 4d7dff3..fb24c73 100644 --- a/exasol/saas/client/openapi/api/clusters/create_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/create_cluster.py @@ -82,10 +82,7 @@ def sync_detailed( body: CreateCluster, ) -> Response[Cluster]: - """ Create cluster - - Create a new cluster - + """ Args: account_id (str): database_id (str): @@ -121,10 +118,7 @@ def sync( body: CreateCluster, ) -> Optional[Cluster]: - """ Create cluster - - Create a new cluster - + """ Args: account_id (str): database_id (str): @@ -155,10 +149,7 @@ async def asyncio_detailed( body: CreateCluster, ) -> Response[Cluster]: - """ Create cluster - - Create a new cluster - + """ Args: account_id (str): database_id (str): @@ -194,10 +185,7 @@ async def asyncio( body: CreateCluster, ) -> Optional[Cluster]: - """ Create cluster - - Create a new cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/delete_cluster.py b/exasol/saas/client/openapi/api/clusters/delete_cluster.py index d0aa721..e5558a1 100644 --- a/exasol/saas/client/openapi/api/clusters/delete_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/delete_cluster.py @@ -68,10 +68,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete cluster - - Delete the cluster, if main cluster is deleted, the whole database will be deleted. - + """ Args: account_id (str): database_id (str): @@ -108,10 +105,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete cluster - - Delete the cluster, if main cluster is deleted, the whole database will be deleted. - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/get_cluster.py b/exasol/saas/client/openapi/api/clusters/get_cluster.py index 4982292..de02b51 100644 --- a/exasol/saas/client/openapi/api/clusters/get_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/get_cluster.py @@ -73,10 +73,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Cluster]: - """ Get cluster - - Get cluster - + """ Args: account_id (str): database_id (str): @@ -112,10 +109,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[Cluster]: - """ Get cluster - - Get cluster - + """ Args: account_id (str): database_id (str): @@ -146,10 +140,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Cluster]: - """ Get cluster - - Get cluster - + """ Args: account_id (str): database_id (str): @@ -185,10 +176,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[Cluster]: - """ Get cluster - - Get cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/get_cluster_connection.py b/exasol/saas/client/openapi/api/clusters/get_cluster_connection.py index aa40832..49aa2b6 100644 --- a/exasol/saas/client/openapi/api/clusters/get_cluster_connection.py +++ b/exasol/saas/client/openapi/api/clusters/get_cluster_connection.py @@ -15,7 +15,7 @@ AuthenticatedClient, Client, ) -from ...models.connections import Connections +from ...models.cluster_connection import ClusterConnection from ...types import ( UNSET, Response, @@ -43,9 +43,9 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Connections]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[ClusterConnection]: if response.status_code == HTTPStatus.OK: - response_200 = Connections.from_dict(response.json()) + response_200 = ClusterConnection.from_dict(response.json()) @@ -56,7 +56,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Connections]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[ClusterConnection]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,11 +72,8 @@ def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Connections]: - """ Get connection information - - Get connection information - +) -> Response[ClusterConnection]: + """ Args: account_id (str): database_id (str): @@ -87,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Connections] + Response[ClusterConnection] """ @@ -111,11 +108,8 @@ def sync( *, client: AuthenticatedClient, -) -> Optional[Connections]: - """ Get connection information - - Get connection information - +) -> Optional[ClusterConnection]: + """ Args: account_id (str): database_id (str): @@ -126,7 +120,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Connections + ClusterConnection """ @@ -145,11 +139,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Connections]: - """ Get connection information - - Get connection information - +) -> Response[ClusterConnection]: + """ Args: account_id (str): database_id (str): @@ -160,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Connections] + Response[ClusterConnection] """ @@ -184,11 +175,8 @@ async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Connections]: - """ Get connection information - - Get connection information - +) -> Optional[ClusterConnection]: + """ Args: account_id (str): database_id (str): @@ -199,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Connections + ClusterConnection """ diff --git a/exasol/saas/client/openapi/api/clusters/list_clusters.py b/exasol/saas/client/openapi/api/clusters/list_clusters.py index cd92bdd..74e9766 100644 --- a/exasol/saas/client/openapi/api/clusters/list_clusters.py +++ b/exasol/saas/client/openapi/api/clusters/list_clusters.py @@ -76,10 +76,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['Cluster']]: - """ List clusters - - List clusters from a database - + """ Args: account_id (str): database_id (str): @@ -112,10 +109,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['Cluster']]: - """ List clusters - - List clusters from a database - + """ Args: account_id (str): database_id (str): @@ -143,10 +137,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['Cluster']]: - """ List clusters - - List clusters from a database - + """ Args: account_id (str): database_id (str): @@ -179,10 +170,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['Cluster']]: - """ List clusters - - List clusters from a database - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/scale_cluster.py b/exasol/saas/client/openapi/api/clusters/scale_cluster.py index 802c9bc..c7f3bd3 100644 --- a/exasol/saas/client/openapi/api/clusters/scale_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/scale_cluster.py @@ -79,10 +79,7 @@ def sync_detailed( body: ScaleCluster, ) -> Response[Any]: - """ Scale cluster - - Scale cluster - + """ Args: account_id (str): database_id (str): @@ -122,10 +119,7 @@ async def asyncio_detailed( body: ScaleCluster, ) -> Response[Any]: - """ Scale cluster - - Scale cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/start_cluster.py b/exasol/saas/client/openapi/api/clusters/start_cluster.py index 4cd724c..eec534c 100644 --- a/exasol/saas/client/openapi/api/clusters/start_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/start_cluster.py @@ -68,10 +68,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Start cluster - - Start cluster - + """ Args: account_id (str): database_id (str): @@ -108,10 +105,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Start cluster - - Start cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/stop_cluster.py b/exasol/saas/client/openapi/api/clusters/stop_cluster.py index 443e5b2..004345b 100644 --- a/exasol/saas/client/openapi/api/clusters/stop_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/stop_cluster.py @@ -68,10 +68,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Stop cluster - - Stop cluster - + """ Args: account_id (str): database_id (str): @@ -108,10 +105,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Stop cluster - - Stop cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/clusters/update_cluster.py b/exasol/saas/client/openapi/api/clusters/update_cluster.py index a20d50c..2c42260 100644 --- a/exasol/saas/client/openapi/api/clusters/update_cluster.py +++ b/exasol/saas/client/openapi/api/clusters/update_cluster.py @@ -79,11 +79,7 @@ def sync_detailed( body: UpdateCluster, ) -> Response[Any]: - """ Update cluster - - Update the cluster with the specified ID. - Only metadata can be changed. To scale the cluster size, use the scale cluster endpoint. - + """ Args: account_id (str): database_id (str): @@ -123,11 +119,7 @@ async def asyncio_detailed( body: UpdateCluster, ) -> Response[Any]: - """ Update cluster - - Update the cluster with the specified ID. - Only metadata can be changed. To scale the cluster size, use the scale cluster endpoint. - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/databases/create_database.py b/exasol/saas/client/openapi/api/databases/create_database.py index 49ee990..2d217f4 100644 --- a/exasol/saas/client/openapi/api/databases/create_database.py +++ b/exasol/saas/client/openapi/api/databases/create_database.py @@ -80,10 +80,7 @@ def sync_detailed( body: CreateDatabase, ) -> Response[Database]: - """ Create database - - Create a new database - + """ Args: account_id (str): body (CreateDatabase): @@ -116,10 +113,7 @@ def sync( body: CreateDatabase, ) -> Optional[Database]: - """ Create database - - Create a new database - + """ Args: account_id (str): body (CreateDatabase): @@ -147,10 +141,7 @@ async def asyncio_detailed( body: CreateDatabase, ) -> Response[Database]: - """ Create database - - Create a new database - + """ Args: account_id (str): body (CreateDatabase): @@ -183,10 +174,7 @@ async def asyncio( body: CreateDatabase, ) -> Optional[Database]: - """ Create database - - Create a new database - + """ Args: account_id (str): body (CreateDatabase): diff --git a/exasol/saas/client/openapi/api/databases/delete_database.py b/exasol/saas/client/openapi/api/databases/delete_database.py index d5c02a5..1930030 100644 --- a/exasol/saas/client/openapi/api/databases/delete_database.py +++ b/exasol/saas/client/openapi/api/databases/delete_database.py @@ -66,10 +66,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete database - - Delete the database and all cluster - + """ Args: account_id (str): database_id (str): @@ -103,10 +100,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete database - - Delete the database and all cluster - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/databases/get_database.py b/exasol/saas/client/openapi/api/databases/get_database.py index a746eb4..bf3783c 100644 --- a/exasol/saas/client/openapi/api/databases/get_database.py +++ b/exasol/saas/client/openapi/api/databases/get_database.py @@ -71,10 +71,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Database]: - """ Get database - - Get the database - + """ Args: account_id (str): database_id (str): @@ -107,10 +104,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[Database]: - """ Get database - - Get the database - + """ Args: account_id (str): database_id (str): @@ -138,10 +132,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Database]: - """ Get database - - Get the database - + """ Args: account_id (str): database_id (str): @@ -174,10 +165,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[Database]: - """ Get database - - Get the database - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/databases/list_databases.py b/exasol/saas/client/openapi/api/databases/list_databases.py index b143b91..40b9f27 100644 --- a/exasol/saas/client/openapi/api/databases/list_databases.py +++ b/exasol/saas/client/openapi/api/databases/list_databases.py @@ -74,10 +74,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['Database']]: - """ List databases - - List databases - + """ Args: account_id (str): @@ -107,10 +104,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['Database']]: - """ List databases - - List databases - + """ Args: account_id (str): @@ -135,10 +129,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['Database']]: - """ List databases - - List databases - + """ Args: account_id (str): @@ -168,10 +159,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['Database']]: - """ List databases - - List databases - + """ Args: account_id (str): diff --git a/exasol/saas/client/openapi/api/databases/start_database.py b/exasol/saas/client/openapi/api/databases/start_database.py index 9724a1a..565ef4d 100644 --- a/exasol/saas/client/openapi/api/databases/start_database.py +++ b/exasol/saas/client/openapi/api/databases/start_database.py @@ -66,11 +66,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Start database - - Start database - If database is from type main, workers will be also started - + """ Args: account_id (str): database_id (str): @@ -104,11 +100,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Start database - - Start database - If database is from type main, workers will be also started - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/databases/stop_database.py b/exasol/saas/client/openapi/api/databases/stop_database.py index 2f77c2a..c827ddf 100644 --- a/exasol/saas/client/openapi/api/databases/stop_database.py +++ b/exasol/saas/client/openapi/api/databases/stop_database.py @@ -66,11 +66,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Stop database - - Stop database - If database is from type main, workers will be also stopped - + """ Args: account_id (str): database_id (str): @@ -104,11 +100,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Stop database - - Stop database - If database is from type main, workers will be also stopped - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/databases/update_database.py b/exasol/saas/client/openapi/api/databases/update_database.py index 8ec927c..b7ea84d 100644 --- a/exasol/saas/client/openapi/api/databases/update_database.py +++ b/exasol/saas/client/openapi/api/databases/update_database.py @@ -77,10 +77,7 @@ def sync_detailed( body: UpdateDatabase, ) -> Response[Any]: - """ Update database - - Update database - + """ Args: account_id (str): database_id (str): @@ -117,10 +114,7 @@ async def asyncio_detailed( body: UpdateDatabase, ) -> Response[Any]: - """ Update database - - Update database - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/extensions/__init__.py b/exasol/saas/client/openapi/api/extensions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/exasol/saas/client/openapi/api/extensions/create_extension_instance.py b/exasol/saas/client/openapi/api/extensions/create_extension_instance.py new file mode 100644 index 0000000..5ab6f95 --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/create_extension_instance.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...models.create_extension_instance import CreateExtensionInstance +from ...models.extension_instance import ExtensionInstance +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + body: CreateExtensionInstance, + +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + + + + + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}/instances".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,), + } + + _body = body.to_dict() + + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[ExtensionInstance]: + if response.status_code == HTTPStatus.OK: + response_200 = ExtensionInstance.from_dict(response.json()) + + + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[ExtensionInstance]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + body: CreateExtensionInstance, + +) -> Response[ExtensionInstance]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + body (CreateExtensionInstance): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExtensionInstance] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + body: CreateExtensionInstance, + +) -> Optional[ExtensionInstance]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + body (CreateExtensionInstance): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExtensionInstance + """ + + + return sync_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + body: CreateExtensionInstance, + +) -> Response[ExtensionInstance]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + body (CreateExtensionInstance): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExtensionInstance] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +body=body, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + body: CreateExtensionInstance, + +) -> Optional[ExtensionInstance]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + body (CreateExtensionInstance): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExtensionInstance + """ + + + return (await asyncio_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, +body=body, + + )).parsed diff --git a/exasol/saas/client/openapi/api/extensions/delete_extension_instance.py b/exasol/saas/client/openapi/api/extensions/delete_extension_instance.py new file mode 100644 index 0000000..e135d1b --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/delete_extension_instance.py @@ -0,0 +1,149 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + instance_id: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}/instances/{instance_id}".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,instance_id=instance_id,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + instance_id: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + instance_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +instance_id=instance_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + instance_id: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + instance_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +instance_id=instance_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + diff --git a/exasol/saas/client/openapi/api/extensions/get_extension.py b/exasol/saas/client/openapi/api/extensions/get_extension.py new file mode 100644 index 0000000..c9060e5 --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/get_extension.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...models.extension_detail import ExtensionDetail +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[ExtensionDetail]: + if response.status_code == HTTPStatus.OK: + response_200 = ExtensionDetail.from_dict(response.json()) + + + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[ExtensionDetail]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[ExtensionDetail]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExtensionDetail] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Optional[ExtensionDetail]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExtensionDetail + """ + + + return sync_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, + + ).parsed + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[ExtensionDetail]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExtensionDetail] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Optional[ExtensionDetail]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExtensionDetail + """ + + + return (await asyncio_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, + + )).parsed diff --git a/exasol/saas/client/openapi/api/extensions/install_extension.py b/exasol/saas/client/openapi/api/extensions/install_extension.py new file mode 100644 index 0000000..2e56351 --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/install_extension.py @@ -0,0 +1,142 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "put", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}/install".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + diff --git a/exasol/saas/client/openapi/api/extensions/list_extension_instances.py b/exasol/saas/client/openapi/api/extensions/list_extension_instances.py new file mode 100644 index 0000000..fd1230c --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/list_extension_instances.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...models.extension_instance import ExtensionInstance +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}/instances".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['ExtensionInstance']]: + if response.status_code == HTTPStatus.OK: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in (_response_200): + response_200_item = ExtensionInstance.from_dict(response_200_item_data) + + + + response_200.append(response_200_item) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['ExtensionInstance']]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[List['ExtensionInstance']]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['ExtensionInstance']] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Optional[List['ExtensionInstance']]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['ExtensionInstance'] + """ + + + return sync_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, + + ).parsed + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[List['ExtensionInstance']]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['ExtensionInstance']] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Optional[List['ExtensionInstance']]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['ExtensionInstance'] + """ + + + return (await asyncio_detailed( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, +client=client, + + )).parsed diff --git a/exasol/saas/client/openapi/api/extensions/list_extensions.py b/exasol/saas/client/openapi/api/extensions/list_extensions.py new file mode 100644 index 0000000..3cc3ecd --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/list_extensions.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...models.extension import Extension +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions".format(account_id=account_id,database_id=database_id,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['Extension']]: + if response.status_code == HTTPStatus.OK: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in (_response_200): + response_200_item = Extension.from_dict(response_200_item_data) + + + + response_200.append(response_200_item) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['Extension']]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + *, + client: AuthenticatedClient, + +) -> Response[List['Extension']]: + """ + Args: + account_id (str): + database_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['Extension']] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + account_id: str, + database_id: str, + *, + client: AuthenticatedClient, + +) -> Optional[List['Extension']]: + """ + Args: + account_id (str): + database_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['Extension'] + """ + + + return sync_detailed( + account_id=account_id, +database_id=database_id, +client=client, + + ).parsed + +async def asyncio_detailed( + account_id: str, + database_id: str, + *, + client: AuthenticatedClient, + +) -> Response[List['Extension']]: + """ + Args: + account_id (str): + database_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['Extension']] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + account_id: str, + database_id: str, + *, + client: AuthenticatedClient, + +) -> Optional[List['Extension']]: + """ + Args: + account_id (str): + database_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['Extension'] + """ + + + return (await asyncio_detailed( + account_id=account_id, +database_id=database_id, +client=client, + + )).parsed diff --git a/exasol/saas/client/openapi/api/extensions/uninstall_extension.py b/exasol/saas/client/openapi/api/extensions/uninstall_extension.py new file mode 100644 index 0000000..0af6691 --- /dev/null +++ b/exasol/saas/client/openapi/api/extensions/uninstall_extension.py @@ -0,0 +1,142 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "put", + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/extensions/{extension_id}/{extension_version}/uninstall".format(account_id=account_id,database_id=database_id,extension_id=extension_id,extension_version=extension_version,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + account_id: str, + database_id: str, + extension_id: str, + extension_version: str, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ + Args: + account_id (str): + database_id (str): + extension_id (str): + extension_version (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +database_id=database_id, +extension_id=extension_id, +extension_version=extension_version, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + diff --git a/exasol/saas/client/openapi/api/files/create_folder.py b/exasol/saas/client/openapi/api/files/create_folder.py index 3bfe60b..074bf6c 100644 --- a/exasol/saas/client/openapi/api/files/create_folder.py +++ b/exasol/saas/client/openapi/api/files/create_folder.py @@ -24,7 +24,7 @@ def _get_kwargs( account_id: str, database_id: str, - path: str, + key: str, ) -> Dict[str, Any]: @@ -35,7 +35,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": "/api/v1/accounts/{account_id}/databases/{database_id}/folder/{path}".format(account_id=account_id,database_id=database_id,path=path,), + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/folder/{key}".format(account_id=account_id,database_id=database_id,key=key,), } @@ -63,19 +63,16 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Create folder - - Create folder - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -89,7 +86,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -103,19 +100,16 @@ def sync_detailed( async def asyncio_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Create folder - - Create folder - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,7 +123,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) diff --git a/exasol/saas/client/openapi/api/files/delete_file.py b/exasol/saas/client/openapi/api/files/delete_file.py index fade37f..49d639a 100644 --- a/exasol/saas/client/openapi/api/files/delete_file.py +++ b/exasol/saas/client/openapi/api/files/delete_file.py @@ -24,7 +24,7 @@ def _get_kwargs( account_id: str, database_id: str, - path: str, + key: str, ) -> Dict[str, Any]: @@ -35,7 +35,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "delete", - "url": "/api/v1/accounts/{account_id}/databases/{database_id}/files/{path}".format(account_id=account_id,database_id=database_id,path=path,), + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/files/{key}".format(account_id=account_id,database_id=database_id,key=key,), } @@ -63,19 +63,16 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Delete file - - Delete file from database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -89,7 +86,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -103,19 +100,16 @@ def sync_detailed( async def asyncio_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Delete file - - Delete file from database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,7 +123,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) diff --git a/exasol/saas/client/openapi/api/files/delete_folder.py b/exasol/saas/client/openapi/api/files/delete_folder.py index 9f23a7c..ff81460 100644 --- a/exasol/saas/client/openapi/api/files/delete_folder.py +++ b/exasol/saas/client/openapi/api/files/delete_folder.py @@ -68,10 +68,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete folder - - Delete folder from database - + """ Args: account_id (str): database_id (str): @@ -108,10 +105,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Delete folder - - Delete folder from database - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/files/download_file.py b/exasol/saas/client/openapi/api/files/download_file.py index 7b2cde2..95d34a1 100644 --- a/exasol/saas/client/openapi/api/files/download_file.py +++ b/exasol/saas/client/openapi/api/files/download_file.py @@ -25,7 +25,7 @@ def _get_kwargs( account_id: str, database_id: str, - path: str, + key: str, ) -> Dict[str, Any]: @@ -36,7 +36,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "get", - "url": "/api/v1/accounts/{account_id}/databases/{database_id}/files/{path}".format(account_id=account_id,database_id=database_id,path=path,), + "url": "/api/v1/internal/accounts/{account_id}/databases/{database_id}/files/{key}".format(account_id=account_id,database_id=database_id,key=key,), } @@ -68,19 +68,16 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[DownloadFile]: - """ Download file - - Download file from bucket via one time link - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -94,7 +91,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -107,19 +104,16 @@ def sync_detailed( def sync( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Optional[DownloadFile]: - """ Download file - - Download file from bucket via one time link - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +127,7 @@ def sync( return sync_detailed( account_id=account_id, database_id=database_id, -path=path, +key=key, client=client, ).parsed @@ -141,19 +135,16 @@ def sync( async def asyncio_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[DownloadFile]: - """ Download file - - Download file from bucket via one time link - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +158,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -180,19 +171,16 @@ async def asyncio_detailed( async def asyncio( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Optional[DownloadFile]: - """ Download file - - Download file from bucket via one time link - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -206,7 +194,7 @@ async def asyncio( return (await asyncio_detailed( account_id=account_id, database_id=database_id, -path=path, +key=key, client=client, )).parsed diff --git a/exasol/saas/client/openapi/api/files/list_files.py b/exasol/saas/client/openapi/api/files/list_files.py index f761bef..2774c16 100644 --- a/exasol/saas/client/openapi/api/files/list_files.py +++ b/exasol/saas/client/openapi/api/files/list_files.py @@ -76,10 +76,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['File']]: - """ List files - - List files uploaded to the database - + """ Args: account_id (str): database_id (str): @@ -112,10 +109,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['File']]: - """ List files - - List files uploaded to the database - + """ Args: account_id (str): database_id (str): @@ -143,10 +137,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['File']]: - """ List files - - List files uploaded to the database - + """ Args: account_id (str): database_id (str): @@ -179,10 +170,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['File']]: - """ List files - - List files uploaded to the database - + """ Args: account_id (str): database_id (str): diff --git a/exasol/saas/client/openapi/api/files/upload_file.py b/exasol/saas/client/openapi/api/files/upload_file.py index b791b5c..0f114e4 100644 --- a/exasol/saas/client/openapi/api/files/upload_file.py +++ b/exasol/saas/client/openapi/api/files/upload_file.py @@ -25,7 +25,7 @@ def _get_kwargs( account_id: str, database_id: str, - path: str, + key: str, ) -> Dict[str, Any]: @@ -36,7 +36,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": "/api/v1/accounts/{account_id}/databases/{database_id}/files/{path}".format(account_id=account_id,database_id=database_id,path=path,), + "url": "/api/v1/accounts/{account_id}/databases/{database_id}/files/{key}".format(account_id=account_id,database_id=database_id,key=key,), } @@ -68,19 +68,16 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[UploadFile]: - """ Get upload file url - - Get one time url to upload any file to the database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -94,7 +91,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -107,19 +104,16 @@ def sync_detailed( def sync( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Optional[UploadFile]: - """ Get upload file url - - Get one time url to upload any file to the database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +127,7 @@ def sync( return sync_detailed( account_id=account_id, database_id=database_id, -path=path, +key=key, client=client, ).parsed @@ -141,19 +135,16 @@ def sync( async def asyncio_detailed( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Response[UploadFile]: - """ Get upload file url - - Get one time url to upload any file to the database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +158,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, database_id=database_id, -path=path, +key=key, ) @@ -180,19 +171,16 @@ async def asyncio_detailed( async def asyncio( account_id: str, database_id: str, - path: str, + key: str, *, client: AuthenticatedClient, ) -> Optional[UploadFile]: - """ Get upload file url - - Get one time url to upload any file to the database - + """ Args: account_id (str): database_id (str): - path (str): + key (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -206,7 +194,7 @@ async def asyncio( return (await asyncio_detailed( account_id=account_id, database_id=database_id, -path=path, +key=key, client=client, )).parsed 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 5001f37..1e05dd8 100644 --- a/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py +++ b/exasol/saas/client/openapi/api/platform/list_cluster_sizes.py @@ -74,10 +74,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['ClusterSize']]: - """ Get cluster sizes for platform - - Get available cluster sizes for platform - + """ Args: platform (str): @@ -107,10 +104,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['ClusterSize']]: - """ Get cluster sizes for platform - - Get available cluster sizes for platform - + """ Args: platform (str): @@ -135,10 +129,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['ClusterSize']]: - """ Get cluster sizes for platform - - Get available cluster sizes for platform - + """ Args: platform (str): @@ -168,10 +159,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['ClusterSize']]: - """ Get cluster sizes for platform - - Get available cluster sizes for platform - + """ Args: platform (str): diff --git a/exasol/saas/client/openapi/api/platform/list_platforms.py b/exasol/saas/client/openapi/api/platform/list_platforms.py index 76fd501..a6cd9b9 100644 --- a/exasol/saas/client/openapi/api/platform/list_platforms.py +++ b/exasol/saas/client/openapi/api/platform/list_platforms.py @@ -72,10 +72,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['Platform']]: - """ List platforms - - Get available platforms - + """ Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -100,10 +97,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['Platform']]: - """ List platforms - - Get available platforms - + """ Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -123,10 +117,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['Platform']]: - """ List platforms - - Get available platforms - + """ Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -151,10 +142,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['Platform']]: - """ List platforms - - Get available platforms - + """ Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. diff --git a/exasol/saas/client/openapi/api/platform/list_regions.py b/exasol/saas/client/openapi/api/platform/list_regions.py index 6d131da..0701975 100644 --- a/exasol/saas/client/openapi/api/platform/list_regions.py +++ b/exasol/saas/client/openapi/api/platform/list_regions.py @@ -74,10 +74,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['Region']]: - """ Get regions for platform - - Get available regions for platform - + """ Args: platform (str): @@ -107,10 +104,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['Region']]: - """ Get regions for platform - - Get available regions for platform - + """ Args: platform (str): @@ -135,10 +129,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['Region']]: - """ Get regions for platform - - Get available regions for platform - + """ Args: platform (str): @@ -168,10 +159,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['Region']]: - """ Get regions for platform - - Get available regions for platform - + """ Args: platform (str): diff --git a/exasol/saas/client/openapi/api/profile/update_profile.py b/exasol/saas/client/openapi/api/profile/update_profile.py index 8a814d3..3fb9999 100644 --- a/exasol/saas/client/openapi/api/profile/update_profile.py +++ b/exasol/saas/client/openapi/api/profile/update_profile.py @@ -73,10 +73,7 @@ def sync_detailed( body: UpdateProfile, ) -> Response[Any]: - """ Update user profile - - Set first and last name of a user profile - + """ Args: body (UpdateProfile): @@ -107,10 +104,7 @@ async def asyncio_detailed( body: UpdateProfile, ) -> Response[Any]: - """ Update user profile - - Set first and last name of a user profile - + """ Args: body (UpdateProfile): diff --git a/exasol/saas/client/openapi/api/security/add_allowed_ip.py b/exasol/saas/client/openapi/api/security/add_allowed_ip.py index 6bca895..1c768fb 100644 --- a/exasol/saas/client/openapi/api/security/add_allowed_ip.py +++ b/exasol/saas/client/openapi/api/security/add_allowed_ip.py @@ -80,10 +80,7 @@ def sync_detailed( body: CreateAllowedIP, ) -> Response[AllowedIP]: - """ Add security rule (CIDR) - - Add security rule to allow access from CIDR - + """ Args: account_id (str): body (CreateAllowedIP): @@ -116,10 +113,7 @@ def sync( body: CreateAllowedIP, ) -> Optional[AllowedIP]: - """ Add security rule (CIDR) - - Add security rule to allow access from CIDR - + """ Args: account_id (str): body (CreateAllowedIP): @@ -147,10 +141,7 @@ async def asyncio_detailed( body: CreateAllowedIP, ) -> Response[AllowedIP]: - """ Add security rule (CIDR) - - Add security rule to allow access from CIDR - + """ Args: account_id (str): body (CreateAllowedIP): @@ -183,10 +174,7 @@ async def asyncio( body: CreateAllowedIP, ) -> Optional[AllowedIP]: - """ Add security rule (CIDR) - - Add security rule to allow access from CIDR - + """ Args: account_id (str): body (CreateAllowedIP): diff --git a/exasol/saas/client/openapi/api/security/delete_allowed_ip.py b/exasol/saas/client/openapi/api/security/delete_allowed_ip.py index 3180d8b..a3d095d 100644 --- a/exasol/saas/client/openapi/api/security/delete_allowed_ip.py +++ b/exasol/saas/client/openapi/api/security/delete_allowed_ip.py @@ -23,7 +23,7 @@ def _get_kwargs( account_id: str, - id: str, + allowlist_ip_id: str, ) -> Dict[str, Any]: @@ -34,7 +34,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "delete", - "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{id}".format(account_id=account_id,id=id,), + "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{allowlist_ip_id}".format(account_id=account_id,allowlist_ip_id=allowlist_ip_id,), } @@ -61,18 +61,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Delete security rule (CIDR) - - Delete security rule (CIDR). No access to database possible after deletion from CIDR - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -85,7 +82,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, ) @@ -98,18 +95,15 @@ def sync_detailed( async def asyncio_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Response[Any]: - """ Delete security rule (CIDR) - - Delete security rule (CIDR). No access to database possible after deletion from CIDR - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +116,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, ) diff --git a/exasol/saas/client/openapi/api/security/get_allowed_ip.py b/exasol/saas/client/openapi/api/security/get_allowed_ip.py index 24ed13c..8080440 100644 --- a/exasol/saas/client/openapi/api/security/get_allowed_ip.py +++ b/exasol/saas/client/openapi/api/security/get_allowed_ip.py @@ -24,7 +24,7 @@ def _get_kwargs( account_id: str, - id: str, + allowlist_ip_id: str, ) -> Dict[str, Any]: @@ -35,7 +35,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "get", - "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{id}".format(account_id=account_id,id=id,), + "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{allowlist_ip_id}".format(account_id=account_id,allowlist_ip_id=allowlist_ip_id,), } @@ -66,18 +66,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Response[AllowedIP]: - """ Get security rule (CIDR) - - Get security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -90,7 +87,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, ) @@ -102,18 +99,15 @@ def sync_detailed( def sync( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Optional[AllowedIP]: - """ Get security rule (CIDR) - - Get security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,25 +120,22 @@ def sync( return sync_detailed( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, client=client, ).parsed async def asyncio_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Response[AllowedIP]: - """ Get security rule (CIDR) - - Get security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -157,7 +148,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, ) @@ -169,18 +160,15 @@ async def asyncio_detailed( async def asyncio( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, ) -> Optional[AllowedIP]: - """ Get security rule (CIDR) - - Get security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,7 +181,7 @@ async def asyncio( return (await asyncio_detailed( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, client=client, )).parsed diff --git a/exasol/saas/client/openapi/api/security/list_allowed_i_ps.py b/exasol/saas/client/openapi/api/security/list_allowed_i_ps.py index 47e9937..19b4ff4 100644 --- a/exasol/saas/client/openapi/api/security/list_allowed_i_ps.py +++ b/exasol/saas/client/openapi/api/security/list_allowed_i_ps.py @@ -74,10 +74,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[List['AllowedIP']]: - """ List security rules (CIDR) - - List security rules (CIDR) - + """ Args: account_id (str): @@ -107,10 +104,7 @@ def sync( client: AuthenticatedClient, ) -> Optional[List['AllowedIP']]: - """ List security rules (CIDR) - - List security rules (CIDR) - + """ Args: account_id (str): @@ -135,10 +129,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[List['AllowedIP']]: - """ List security rules (CIDR) - - List security rules (CIDR) - + """ Args: account_id (str): @@ -168,10 +159,7 @@ async def asyncio( client: AuthenticatedClient, ) -> Optional[List['AllowedIP']]: - """ List security rules (CIDR) - - List security rules (CIDR) - + """ Args: account_id (str): diff --git a/exasol/saas/client/openapi/api/security/update_allowed_ip.py b/exasol/saas/client/openapi/api/security/update_allowed_ip.py index 2b11552..1f3cb58 100644 --- a/exasol/saas/client/openapi/api/security/update_allowed_ip.py +++ b/exasol/saas/client/openapi/api/security/update_allowed_ip.py @@ -24,7 +24,7 @@ def _get_kwargs( account_id: str, - id: str, + allowlist_ip_id: str, *, body: UpdateAllowedIP, @@ -38,7 +38,7 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "put", - "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{id}".format(account_id=account_id,id=id,), + "url": "/api/v1/accounts/{account_id}/security/allowlist_ip/{allowlist_ip_id}".format(account_id=account_id,allowlist_ip_id=allowlist_ip_id,), } _body = body.to_dict() @@ -71,19 +71,16 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, body: UpdateAllowedIP, ) -> Response[Any]: - """ Update security rule (CIDR) - - Update security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): body (UpdateAllowedIP): Raises: @@ -97,7 +94,7 @@ def sync_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, body=body, ) @@ -111,19 +108,16 @@ def sync_detailed( async def asyncio_detailed( account_id: str, - id: str, + allowlist_ip_id: str, *, client: AuthenticatedClient, body: UpdateAllowedIP, ) -> Response[Any]: - """ Update security rule (CIDR) - - Update security rule (CIDR) - + """ Args: account_id (str): - id (str): + allowlist_ip_id (str): body (UpdateAllowedIP): Raises: @@ -137,7 +131,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( account_id=account_id, -id=id, +allowlist_ip_id=allowlist_ip_id, body=body, ) diff --git a/exasol/saas/client/openapi/api/usage/get_usage.py b/exasol/saas/client/openapi/api/usage/get_usage.py index ec9bf85..d591a5e 100644 --- a/exasol/saas/client/openapi/api/usage/get_usage.py +++ b/exasol/saas/client/openapi/api/usage/get_usage.py @@ -15,8 +15,8 @@ AuthenticatedClient, Client, ) -from ...models.get_usage_response_200 import GetUsageResponse200 from ...models.get_usage_type import GetUsageType +from ...models.usage import Usage from ...types import ( UNSET, Response, @@ -27,7 +27,7 @@ def _get_kwargs( account_id: str, *, - year_month: str, + year_month: Union[Unset, str] = UNSET, type: Union[Unset, GetUsageType] = UNSET, ) -> Dict[str, Any]: @@ -59,9 +59,9 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[GetUsageResponse200]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Usage]: if response.status_code == HTTPStatus.OK: - response_200 = GetUsageResponse200.from_dict(response.json()) + response_200 = Usage.from_dict(response.json()) @@ -72,7 +72,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[GetUsageResponse200]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Usage]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -85,17 +85,14 @@ def sync_detailed( account_id: str, *, client: AuthenticatedClient, - year_month: str, + year_month: Union[Unset, str] = UNSET, type: Union[Unset, GetUsageType] = UNSET, -) -> Response[GetUsageResponse200]: - """ Get usage - - Show usage for one month - +) -> Response[Usage]: + """ Args: account_id (str): - year_month (str): + year_month (Union[Unset, str]): type (Union[Unset, GetUsageType]): Raises: @@ -103,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[GetUsageResponse200] + Response[Usage] """ @@ -124,17 +121,14 @@ def sync( account_id: str, *, client: AuthenticatedClient, - year_month: str, + year_month: Union[Unset, str] = UNSET, type: Union[Unset, GetUsageType] = UNSET, -) -> Optional[GetUsageResponse200]: - """ Get usage - - Show usage for one month - +) -> Optional[Usage]: + """ Args: account_id (str): - year_month (str): + year_month (Union[Unset, str]): type (Union[Unset, GetUsageType]): Raises: @@ -142,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - GetUsageResponse200 + Usage """ @@ -158,17 +152,14 @@ async def asyncio_detailed( account_id: str, *, client: AuthenticatedClient, - year_month: str, + year_month: Union[Unset, str] = UNSET, type: Union[Unset, GetUsageType] = UNSET, -) -> Response[GetUsageResponse200]: - """ Get usage - - Show usage for one month - +) -> Response[Usage]: + """ Args: account_id (str): - year_month (str): + year_month (Union[Unset, str]): type (Union[Unset, GetUsageType]): Raises: @@ -176,7 +167,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[GetUsageResponse200] + Response[Usage] """ @@ -197,17 +188,14 @@ async def asyncio( account_id: str, *, client: AuthenticatedClient, - year_month: str, + year_month: Union[Unset, str] = UNSET, type: Union[Unset, GetUsageType] = UNSET, -) -> Optional[GetUsageResponse200]: - """ Get usage - - Show usage for one month - +) -> Optional[Usage]: + """ Args: account_id (str): - year_month (str): + year_month (Union[Unset, str]): type (Union[Unset, GetUsageType]): Raises: @@ -215,7 +203,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - GetUsageResponse200 + Usage """ diff --git a/exasol/saas/client/openapi/api/users/delete_user.py b/exasol/saas/client/openapi/api/users/delete_user.py index 30de9da..27afd24 100644 --- a/exasol/saas/client/openapi/api/users/delete_user.py +++ b/exasol/saas/client/openapi/api/users/delete_user.py @@ -66,10 +66,7 @@ def sync_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Remove user - - Remove user from account - + """ Args: account_id (str): user_id (str): @@ -103,10 +100,7 @@ async def asyncio_detailed( client: AuthenticatedClient, ) -> Response[Any]: - """ Remove user - - Remove user from account - + """ Args: account_id (str): user_id (str): diff --git a/exasol/saas/client/openapi/api/users/get_user.py b/exasol/saas/client/openapi/api/users/get_user.py new file mode 100644 index 0000000..ba833d0 --- /dev/null +++ b/exasol/saas/client/openapi/api/users/get_user.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + List, + Optional, + Union, + cast, +) + +import httpx + +from ... import errors +from ...client import ( + AuthenticatedClient, + Client, +) +from ...models.user import User +from ...types import ( + UNSET, + Response, +) + + +def _get_kwargs( + account_id: str, + user_id: str, + +) -> Dict[str, Any]: + + + + + + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/internal/accounts/{account_id}/users/{user_id}".format(account_id=account_id,user_id=user_id,), + } + + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[User]: + if response.status_code == HTTPStatus.OK: + response_200 = User.from_dict(response.json()) + + + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[User]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + account_id: str, + user_id: str, + *, + client: AuthenticatedClient, + +) -> Response[User]: + """ + Args: + account_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[User] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +user_id=user_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + account_id: str, + user_id: str, + *, + client: AuthenticatedClient, + +) -> Optional[User]: + """ + Args: + account_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + User + """ + + + return sync_detailed( + account_id=account_id, +user_id=user_id, +client=client, + + ).parsed + +async def asyncio_detailed( + account_id: str, + user_id: str, + *, + client: AuthenticatedClient, + +) -> Response[User]: + """ + Args: + account_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[User] + """ + + + kwargs = _get_kwargs( + account_id=account_id, +user_id=user_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + account_id: str, + user_id: str, + *, + client: AuthenticatedClient, + +) -> Optional[User]: + """ + Args: + account_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + User + """ + + + return (await asyncio_detailed( + account_id=account_id, +user_id=user_id, +client=client, + + )).parsed diff --git a/exasol/saas/client/openapi/api/users/list_users.py b/exasol/saas/client/openapi/api/users/list_users.py index 9b1432b..5bbd62c 100644 --- a/exasol/saas/client/openapi/api/users/list_users.py +++ b/exasol/saas/client/openapi/api/users/list_users.py @@ -15,7 +15,7 @@ AuthenticatedClient, Client, ) -from ...models.profile import Profile +from ...models.user import User from ...types import ( UNSET, Response, @@ -57,12 +57,12 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['Profile']]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['User']]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() for response_200_item_data in (_response_200): - response_200_item = Profile.from_dict(response_200_item_data) + response_200_item = User.from_dict(response_200_item_data) @@ -75,7 +75,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['Profile']]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['User']]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -92,11 +92,8 @@ def sync_detailed( next_: Union[Unset, int] = UNSET, limit: Union[Unset, int] = UNSET, -) -> Response[List['Profile']]: - """ List users - - List users for account - +) -> Response[List['User']]: + """ Args: account_id (str): filter_ (Union[Unset, str]): @@ -108,7 +105,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Profile']] + Response[List['User']] """ @@ -134,11 +131,8 @@ def sync( next_: Union[Unset, int] = UNSET, limit: Union[Unset, int] = UNSET, -) -> Optional[List['Profile']]: - """ List users - - List users for account - +) -> Optional[List['User']]: + """ Args: account_id (str): filter_ (Union[Unset, str]): @@ -150,7 +144,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Profile'] + List['User'] """ @@ -171,11 +165,8 @@ async def asyncio_detailed( next_: Union[Unset, int] = UNSET, limit: Union[Unset, int] = UNSET, -) -> Response[List['Profile']]: - """ List users - - List users for account - +) -> Response[List['User']]: + """ Args: account_id (str): filter_ (Union[Unset, str]): @@ -187,7 +178,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Profile']] + Response[List['User']] """ @@ -213,11 +204,8 @@ async def asyncio( next_: Union[Unset, int] = UNSET, limit: Union[Unset, int] = UNSET, -) -> Optional[List['Profile']]: - """ List users - - List users for account - +) -> Optional[List['User']]: + """ Args: account_id (str): filter_ (Union[Unset, str]): @@ -229,7 +217,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Profile'] + List['User'] """ diff --git a/exasol/saas/client/openapi/api/users/patch_user.py b/exasol/saas/client/openapi/api/users/patch_user.py index 56a7f9a..df14aff 100644 --- a/exasol/saas/client/openapi/api/users/patch_user.py +++ b/exasol/saas/client/openapi/api/users/patch_user.py @@ -77,10 +77,7 @@ def sync_detailed( body: PatchUser, ) -> Response[Any]: - """ Patch user - - Patch user - + """ Args: account_id (str): user_id (str): @@ -117,10 +114,7 @@ async def asyncio_detailed( body: PatchUser, ) -> Response[Any]: - """ Patch user - - Patch user - + """ Args: account_id (str): user_id (str): diff --git a/exasol/saas/client/openapi/models/__init__.py b/exasol/saas/client/openapi/models/__init__.py index f4fb5e0..c10c5d9 100644 --- a/exasol/saas/client/openapi/models/__init__.py +++ b/exasol/saas/client/openapi/models/__init__.py @@ -1,27 +1,32 @@ """ Contains all the data models used in inputs/outputs """ from .allowed_ip import AllowedIP -from .api_error import APIError -from .api_error_causes import APIErrorCauses +from .api_error import ApiError from .auto_stop import AutoStop from .cluster import Cluster -from .cluster_overview import ClusterOverview +from .cluster_connection import ClusterConnection from .cluster_size import ClusterSize from .connection_i_ps import ConnectionIPs -from .connections import Connections from .create_allowed_ip import CreateAllowedIP from .create_cluster import CreateCluster from .create_database import CreateDatabase +from .create_database_initial_cluster import CreateDatabaseInitialCluster +from .create_extension_instance import CreateExtensionInstance from .database import Database +from .database_clusters import DatabaseClusters +from .database_integrations_item import DatabaseIntegrationsItem from .download_file import DownloadFile +from .extension import Extension +from .extension_detail import ExtensionDetail +from .extension_instance import ExtensionInstance +from .extension_parameter_definitions import ExtensionParameterDefinitions +from .extension_parameter_value import ExtensionParameterValue +from .extension_version import ExtensionVersion from .file import File -from .get_usage_response_200 import GetUsageResponse200 from .get_usage_type import GetUsageType -from .integrations import Integrations -from .patch_databases import PatchDatabases from .patch_user import PatchUser +from .patch_user_databases import PatchUserDatabases from .platform import Platform -from .profile import Profile from .region import Region from .scale_cluster import ScaleCluster from .status import Status @@ -30,35 +35,42 @@ from .update_database import UpdateDatabase from .update_profile import UpdateProfile from .upload_file import UploadFile +from .usage import Usage +from .usage_additional_property_item import UsageAdditionalPropertyItem from .usage_cluster import UsageCluster -from .usage_database import UsageDatabase +from .user import User from .user_database import UserDatabase from .user_role import UserRole from .user_status import UserStatus __all__ = ( "AllowedIP", - "APIError", - "APIErrorCauses", + "ApiError", "AutoStop", "Cluster", - "ClusterOverview", + "ClusterConnection", "ClusterSize", "ConnectionIPs", - "Connections", "CreateAllowedIP", "CreateCluster", "CreateDatabase", + "CreateDatabaseInitialCluster", + "CreateExtensionInstance", "Database", + "DatabaseClusters", + "DatabaseIntegrationsItem", "DownloadFile", + "Extension", + "ExtensionDetail", + "ExtensionInstance", + "ExtensionParameterDefinitions", + "ExtensionParameterValue", + "ExtensionVersion", "File", - "GetUsageResponse200", "GetUsageType", - "Integrations", - "PatchDatabases", "PatchUser", + "PatchUserDatabases", "Platform", - "Profile", "Region", "ScaleCluster", "Status", @@ -67,8 +79,10 @@ "UpdateDatabase", "UpdateProfile", "UploadFile", + "Usage", + "UsageAdditionalPropertyItem", "UsageCluster", - "UsageDatabase", + "User", "UserDatabase", "UserRole", "UserStatus", diff --git a/exasol/saas/client/openapi/models/api_error.py b/exasol/saas/client/openapi/models/api_error.py index 543230d..6dca9f1 100644 --- a/exasol/saas/client/openapi/models/api_error.py +++ b/exasol/saas/client/openapi/models/api_error.py @@ -1,4 +1,3 @@ -import datetime from typing import ( TYPE_CHECKING, Any, @@ -10,80 +9,78 @@ Type, TypeVar, Union, - cast, ) from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse from ..types import ( UNSET, Unset, ) -if TYPE_CHECKING: - from ..models.api_error_causes import APIErrorCauses - - - - - -T = TypeVar("T", bound="APIError") +T = TypeVar("T", bound="ApiError") @_attrs_define -class APIError: +class ApiError: """ Attributes: - code (int): + status (float): message (str): - causes (Union[Unset, APIErrorCauses]): - request_id (Union[Unset, str]): - timestamp (Union[Unset, datetime.datetime]): - api_id (Union[Unset, str]): + request_id (str): + path (str): + method (str): + log_id (str): + handler (str): + timestamp (str): + causes (Union[Unset, Any]): """ - code: int + status: float message: str - causes: Union[Unset, 'APIErrorCauses'] = UNSET - request_id: Union[Unset, str] = UNSET - timestamp: Union[Unset, datetime.datetime] = UNSET - api_id: Union[Unset, str] = UNSET + request_id: str + path: str + method: str + log_id: str + handler: str + timestamp: str + causes: Union[Unset, Any] = UNSET def to_dict(self) -> Dict[str, Any]: - from ..models.api_error_causes import APIErrorCauses - code = self.code + status = self.status message = self.message - causes: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.causes, Unset): - causes = self.causes.to_dict() - request_id = self.request_id - timestamp: Union[Unset, str] = UNSET - if not isinstance(self.timestamp, Unset): - timestamp = self.timestamp.isoformat() + path = self.path + + method = self.method + + log_id = self.log_id - api_id = self.api_id + handler = self.handler + + timestamp = self.timestamp + + causes = self.causes field_dict: Dict[str, Any] = {} field_dict.update({ - "code": code, + "status": status, "message": message, + "requestId": request_id, + "path": path, + "method": method, + "logId": log_id, + "handler": handler, + "timestamp": timestamp, }) if causes is not UNSET: field_dict["causes"] = causes - if request_id is not UNSET: - field_dict["requestID"] = request_id - if timestamp is not UNSET: - field_dict["timestamp"] = timestamp - if api_id is not UNSET: - field_dict["apiID"] = api_id return field_dict @@ -91,43 +88,35 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.api_error_causes import APIErrorCauses d = src_dict.copy() - code = d.pop("code") + status = d.pop("status") message = d.pop("message") - _causes = d.pop("causes", UNSET) - causes: Union[Unset, APIErrorCauses] - if isinstance(_causes, Unset): - causes = UNSET - else: - causes = APIErrorCauses.from_dict(_causes) - - + request_id = d.pop("requestId") + path = d.pop("path") - request_id = d.pop("requestID", UNSET) + method = d.pop("method") - _timestamp = d.pop("timestamp", UNSET) - timestamp: Union[Unset, datetime.datetime] - if isinstance(_timestamp, Unset): - timestamp = UNSET - else: - timestamp = isoparse(_timestamp) + log_id = d.pop("logId") + handler = d.pop("handler") + timestamp = d.pop("timestamp") - - api_id = d.pop("apiID", UNSET) + causes = d.pop("causes", UNSET) api_error = cls( - code=code, + status=status, message=message, - causes=causes, request_id=request_id, + path=path, + method=method, + log_id=log_id, + handler=handler, timestamp=timestamp, - api_id=api_id, + causes=causes, ) return api_error diff --git a/exasol/saas/client/openapi/models/connections.py b/exasol/saas/client/openapi/models/cluster_connection.py similarity index 92% rename from exasol/saas/client/openapi/models/connections.py rename to exasol/saas/client/openapi/models/cluster_connection.py index 5390324..a3f00b3 100644 --- a/exasol/saas/client/openapi/models/connections.py +++ b/exasol/saas/client/openapi/models/cluster_connection.py @@ -26,11 +26,11 @@ -T = TypeVar("T", bound="Connections") +T = TypeVar("T", bound="ClusterConnection") @_attrs_define -class Connections: +class ClusterConnection: """ Attributes: dns (str): @@ -90,7 +90,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: db_username = d.pop("dbUsername") - connections = cls( + cluster_connection = cls( dns=dns, port=port, jdbc=jdbc, @@ -98,5 +98,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: db_username=db_username, ) - return connections + return cluster_connection diff --git a/exasol/saas/client/openapi/models/create_database.py b/exasol/saas/client/openapi/models/create_database.py index 0175ccb..f84efc6 100644 --- a/exasol/saas/client/openapi/models/create_database.py +++ b/exasol/saas/client/openapi/models/create_database.py @@ -3,6 +3,7 @@ Any, BinaryIO, Dict, + List, Optional, TextIO, Tuple, @@ -20,7 +21,7 @@ ) if TYPE_CHECKING: - from ..models.create_cluster import CreateCluster + from ..models.create_database_initial_cluster import CreateDatabaseInitialCluster @@ -34,19 +35,22 @@ class CreateDatabase: """ Attributes: name (str): - initial_cluster (CreateCluster): + initial_cluster (CreateDatabaseInitialCluster): provider (str): region (str): """ name: str - initial_cluster: 'CreateCluster' + initial_cluster: 'CreateDatabaseInitialCluster' provider: str region: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.create_cluster import CreateCluster + from ..models.create_database_initial_cluster import ( + CreateDatabaseInitialCluster, + ) name = self.name initial_cluster = self.initial_cluster.to_dict() @@ -57,6 +61,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) field_dict.update({ "name": name, "initialCluster": initial_cluster, @@ -70,11 +75,13 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_cluster import CreateCluster + from ..models.create_database_initial_cluster import ( + CreateDatabaseInitialCluster, + ) d = src_dict.copy() name = d.pop("name") - initial_cluster = CreateCluster.from_dict(d.pop("initialCluster")) + initial_cluster = CreateDatabaseInitialCluster.from_dict(d.pop("initialCluster")) @@ -90,5 +97,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: region=region, ) + create_database.additional_properties = d return create_database + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/exasol/saas/client/openapi/models/create_database_initial_cluster.py b/exasol/saas/client/openapi/models/create_database_initial_cluster.py new file mode 100644 index 0000000..4863649 --- /dev/null +++ b/exasol/saas/client/openapi/models/create_database_initial_cluster.py @@ -0,0 +1,95 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + Optional, + TextIO, + Tuple, + Type, + TypeVar, + Union, + cast, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +if TYPE_CHECKING: + from ..models.auto_stop import AutoStop + + + + + +T = TypeVar("T", bound="CreateDatabaseInitialCluster") + + +@_attrs_define +class CreateDatabaseInitialCluster: + """ + Attributes: + name (str): + size (str): + auto_stop (Union[Unset, AutoStop]): + """ + + name: str + size: str + auto_stop: Union[Unset, 'AutoStop'] = UNSET + + + def to_dict(self) -> Dict[str, Any]: + from ..models.auto_stop import AutoStop + name = self.name + + size = self.size + + auto_stop: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.auto_stop, Unset): + auto_stop = self.auto_stop.to_dict() + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "name": name, + "size": size, + }) + if auto_stop is not UNSET: + field_dict["autoStop"] = auto_stop + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.auto_stop import AutoStop + d = src_dict.copy() + name = d.pop("name") + + size = d.pop("size") + + _auto_stop = d.pop("autoStop", UNSET) + auto_stop: Union[Unset, AutoStop] + if isinstance(_auto_stop, Unset): + auto_stop = UNSET + else: + auto_stop = AutoStop.from_dict(_auto_stop) + + + + + create_database_initial_cluster = cls( + name=name, + size=size, + auto_stop=auto_stop, + ) + + return create_database_initial_cluster + diff --git a/exasol/saas/client/openapi/models/create_extension_instance.py b/exasol/saas/client/openapi/models/create_extension_instance.py new file mode 100644 index 0000000..d88e12a --- /dev/null +++ b/exasol/saas/client/openapi/models/create_extension_instance.py @@ -0,0 +1,83 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + List, + Optional, + TextIO, + Tuple, + Type, + TypeVar, + cast, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +if TYPE_CHECKING: + from ..models.extension_parameter_value import ExtensionParameterValue + + + + + +T = TypeVar("T", bound="CreateExtensionInstance") + + +@_attrs_define +class CreateExtensionInstance: + """ + Attributes: + parameter_values (List['ExtensionParameterValue']): + """ + + parameter_values: List['ExtensionParameterValue'] + + + def to_dict(self) -> Dict[str, Any]: + from ..models.extension_parameter_value import ExtensionParameterValue + parameter_values = [] + for parameter_values_item_data in self.parameter_values: + parameter_values_item = parameter_values_item_data.to_dict() + parameter_values.append(parameter_values_item) + + + + + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "parameterValues": parameter_values, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.extension_parameter_value import ExtensionParameterValue + d = src_dict.copy() + parameter_values = [] + _parameter_values = d.pop("parameterValues") + for parameter_values_item_data in (_parameter_values): + parameter_values_item = ExtensionParameterValue.from_dict(parameter_values_item_data) + + + + parameter_values.append(parameter_values_item) + + + create_extension_instance = cls( + parameter_values=parameter_values, + ) + + return create_extension_instance + diff --git a/exasol/saas/client/openapi/models/database.py b/exasol/saas/client/openapi/models/database.py index b051a49..116f070 100644 --- a/exasol/saas/client/openapi/models/database.py +++ b/exasol/saas/client/openapi/models/database.py @@ -25,8 +25,8 @@ ) if TYPE_CHECKING: - from ..models.cluster_overview import ClusterOverview - from ..models.integrations import Integrations + from ..models.database_clusters import DatabaseClusters + from ..models.database_integrations_item import DatabaseIntegrationsItem @@ -42,12 +42,12 @@ class Database: status (Status): id (str): name (str): - clusters (ClusterOverview): + clusters (DatabaseClusters): provider (str): region (str): created_at (datetime.datetime): created_by (str): - integrations (Union[Unset, List['Integrations']]): + integrations (Union[Unset, List['DatabaseIntegrationsItem']]): deleted_by (Union[Unset, str]): deleted_at (Union[Unset, datetime.datetime]): """ @@ -55,19 +55,20 @@ class Database: status: Status id: str name: str - clusters: 'ClusterOverview' + clusters: 'DatabaseClusters' provider: str region: str created_at: datetime.datetime created_by: str - integrations: Union[Unset, List['Integrations']] = UNSET + integrations: Union[Unset, List['DatabaseIntegrationsItem']] = UNSET deleted_by: Union[Unset, str] = UNSET deleted_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.cluster_overview import ClusterOverview - from ..models.integrations import Integrations + from ..models.database_clusters import DatabaseClusters + from ..models.database_integrations_item import DatabaseIntegrationsItem status = self.status.value id = self.id @@ -103,6 +104,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) field_dict.update({ "status": status, "id": id, @@ -126,8 +128,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.cluster_overview import ClusterOverview - from ..models.integrations import Integrations + from ..models.database_clusters import DatabaseClusters + from ..models.database_integrations_item import DatabaseIntegrationsItem d = src_dict.copy() status = Status(d.pop("status")) @@ -138,7 +140,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name") - clusters = ClusterOverview.from_dict(d.pop("clusters")) + clusters = DatabaseClusters.from_dict(d.pop("clusters")) @@ -157,7 +159,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: integrations = [] _integrations = d.pop("integrations", UNSET) for integrations_item_data in (_integrations or []): - integrations_item = Integrations.from_dict(integrations_item_data) + integrations_item = DatabaseIntegrationsItem.from_dict(integrations_item_data) @@ -190,5 +192,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: deleted_at=deleted_at, ) + database.additional_properties = d return database + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/exasol/saas/client/openapi/models/cluster_overview.py b/exasol/saas/client/openapi/models/database_clusters.py similarity index 87% rename from exasol/saas/client/openapi/models/cluster_overview.py rename to exasol/saas/client/openapi/models/database_clusters.py index ac40686..ce38456 100644 --- a/exasol/saas/client/openapi/models/cluster_overview.py +++ b/exasol/saas/client/openapi/models/database_clusters.py @@ -18,11 +18,11 @@ Unset, ) -T = TypeVar("T", bound="ClusterOverview") +T = TypeVar("T", bound="DatabaseClusters") @_attrs_define -class ClusterOverview: +class DatabaseClusters: """ Attributes: total (int): @@ -56,10 +56,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: running = d.pop("running") - cluster_overview = cls( + database_clusters = cls( total=total, running=running, ) - return cluster_overview + return database_clusters diff --git a/exasol/saas/client/openapi/models/api_error_causes.py b/exasol/saas/client/openapi/models/database_integrations_item.py similarity index 50% rename from exasol/saas/client/openapi/models/api_error_causes.py rename to exasol/saas/client/openapi/models/database_integrations_item.py index 2e115bf..d29c550 100644 --- a/exasol/saas/client/openapi/models/api_error_causes.py +++ b/exasol/saas/client/openapi/models/database_integrations_item.py @@ -9,6 +9,7 @@ Tuple, Type, TypeVar, + Union, ) from attrs import define as _attrs_define @@ -19,21 +20,40 @@ Unset, ) -T = TypeVar("T", bound="APIErrorCauses") +T = TypeVar("T", bound="DatabaseIntegrationsItem") @_attrs_define -class APIErrorCauses: +class DatabaseIntegrationsItem: """ + Attributes: + id (str): + name (str): + url (Union[Unset, str]): """ - additional_properties: Dict[str, bool] = _attrs_field(init=False, factory=dict) + id: str + name: str + url: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - + id = self.id + + name = self.name + + url = self.url + + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) + field_dict.update({ + "id": id, + "name": name, + }) + if url is not UNSET: + field_dict["url"] = url return field_dict @@ -42,21 +62,29 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - api_error_causes = cls( - ) + id = d.pop("id") + + name = d.pop("name") + url = d.pop("url", UNSET) + + database_integrations_item = cls( + id=id, + name=name, + url=url, + ) - api_error_causes.additional_properties = d - return api_error_causes + database_integrations_item.additional_properties = d + return database_integrations_item @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> bool: + def __getitem__(self, key: str) -> Any: return self.additional_properties[key] - def __setitem__(self, key: str, value: bool) -> None: + def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/exasol/saas/client/openapi/models/extension.py b/exasol/saas/client/openapi/models/extension.py new file mode 100644 index 0000000..60c07fd --- /dev/null +++ b/exasol/saas/client/openapi/models/extension.py @@ -0,0 +1,115 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + List, + Optional, + TextIO, + Tuple, + Type, + TypeVar, + cast, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +if TYPE_CHECKING: + from ..models.extension_version import ExtensionVersion + + + + + +T = TypeVar("T", bound="Extension") + + +@_attrs_define +class Extension: + """ + Attributes: + id (str): + name (str): + description (str): + category_id (str): + installable_versions (List['ExtensionVersion']): + """ + + id: str + name: str + description: str + category_id: str + installable_versions: List['ExtensionVersion'] + + + def to_dict(self) -> Dict[str, Any]: + from ..models.extension_version import ExtensionVersion + id = self.id + + name = self.name + + description = self.description + + category_id = self.category_id + + installable_versions = [] + for installable_versions_item_data in self.installable_versions: + installable_versions_item = installable_versions_item_data.to_dict() + installable_versions.append(installable_versions_item) + + + + + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "id": id, + "name": name, + "description": description, + "categoryId": category_id, + "installableVersions": installable_versions, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.extension_version import ExtensionVersion + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + description = d.pop("description") + + category_id = d.pop("categoryId") + + installable_versions = [] + _installable_versions = d.pop("installableVersions") + for installable_versions_item_data in (_installable_versions): + installable_versions_item = ExtensionVersion.from_dict(installable_versions_item_data) + + + + installable_versions.append(installable_versions_item) + + + extension = cls( + id=id, + name=name, + description=description, + category_id=category_id, + installable_versions=installable_versions, + ) + + return extension + diff --git a/exasol/saas/client/openapi/models/extension_detail.py b/exasol/saas/client/openapi/models/extension_detail.py new file mode 100644 index 0000000..075c964 --- /dev/null +++ b/exasol/saas/client/openapi/models/extension_detail.py @@ -0,0 +1,103 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + List, + Optional, + TextIO, + Tuple, + Type, + TypeVar, + cast, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +if TYPE_CHECKING: + from ..models.extension_parameter_definitions import ExtensionParameterDefinitions + + + + + +T = TypeVar("T", bound="ExtensionDetail") + + +@_attrs_define +class ExtensionDetail: + """ + Attributes: + id (str): + version (str): + parameter_definitions (List['ExtensionParameterDefinitions']): + """ + + id: str + version: str + parameter_definitions: List['ExtensionParameterDefinitions'] + + + def to_dict(self) -> Dict[str, Any]: + from ..models.extension_parameter_definitions import ( + ExtensionParameterDefinitions, + ) + id = self.id + + version = self.version + + parameter_definitions = [] + for parameter_definitions_item_data in self.parameter_definitions: + parameter_definitions_item = parameter_definitions_item_data.to_dict() + parameter_definitions.append(parameter_definitions_item) + + + + + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "id": id, + "version": version, + "parameterDefinitions": parameter_definitions, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.extension_parameter_definitions import ( + ExtensionParameterDefinitions, + ) + d = src_dict.copy() + id = d.pop("id") + + version = d.pop("version") + + parameter_definitions = [] + _parameter_definitions = d.pop("parameterDefinitions") + for parameter_definitions_item_data in (_parameter_definitions): + parameter_definitions_item = ExtensionParameterDefinitions.from_dict(parameter_definitions_item_data) + + + + parameter_definitions.append(parameter_definitions_item) + + + extension_detail = cls( + id=id, + version=version, + parameter_definitions=parameter_definitions, + ) + + return extension_detail + diff --git a/exasol/saas/client/openapi/models/integrations.py b/exasol/saas/client/openapi/models/extension_instance.py similarity index 71% rename from exasol/saas/client/openapi/models/integrations.py rename to exasol/saas/client/openapi/models/extension_instance.py index 9ae0f40..ab54c3e 100644 --- a/exasol/saas/client/openapi/models/integrations.py +++ b/exasol/saas/client/openapi/models/extension_instance.py @@ -8,7 +8,6 @@ Tuple, Type, TypeVar, - Union, ) from attrs import define as _attrs_define @@ -19,21 +18,19 @@ Unset, ) -T = TypeVar("T", bound="Integrations") +T = TypeVar("T", bound="ExtensionInstance") @_attrs_define -class Integrations: +class ExtensionInstance: """ Attributes: id (str): name (str): - url (Union[Unset, str]): """ id: str name: str - url: Union[Unset, str] = UNSET def to_dict(self) -> Dict[str, Any]: @@ -41,16 +38,12 @@ def to_dict(self) -> Dict[str, Any]: name = self.name - url = self.url - field_dict: Dict[str, Any] = {} field_dict.update({ "id": id, "name": name, }) - if url is not UNSET: - field_dict["url"] = url return field_dict @@ -63,13 +56,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name") - url = d.pop("url", UNSET) - - integrations = cls( + extension_instance = cls( id=id, name=name, - url=url, ) - return integrations + return extension_instance diff --git a/exasol/saas/client/openapi/models/extension_parameter_definitions.py b/exasol/saas/client/openapi/models/extension_parameter_definitions.py new file mode 100644 index 0000000..fa0eb86 --- /dev/null +++ b/exasol/saas/client/openapi/models/extension_parameter_definitions.py @@ -0,0 +1,75 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + Optional, + TextIO, + Tuple, + Type, + TypeVar, + Union, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +T = TypeVar("T", bound="ExtensionParameterDefinitions") + + +@_attrs_define +class ExtensionParameterDefinitions: + """ + Attributes: + id (str): + name (str): + raw_definition (Union[Unset, Any]): + """ + + id: str + name: str + raw_definition: Union[Unset, Any] = UNSET + + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + name = self.name + + raw_definition = self.raw_definition + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "id": id, + "name": name, + }) + if raw_definition is not UNSET: + field_dict["rawDefinition"] = raw_definition + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + raw_definition = d.pop("rawDefinition", UNSET) + + extension_parameter_definitions = cls( + id=id, + name=name, + raw_definition=raw_definition, + ) + + return extension_parameter_definitions + diff --git a/exasol/saas/client/openapi/models/extension_parameter_value.py b/exasol/saas/client/openapi/models/extension_parameter_value.py new file mode 100644 index 0000000..a416354 --- /dev/null +++ b/exasol/saas/client/openapi/models/extension_parameter_value.py @@ -0,0 +1,65 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + Optional, + TextIO, + Tuple, + Type, + TypeVar, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +T = TypeVar("T", bound="ExtensionParameterValue") + + +@_attrs_define +class ExtensionParameterValue: + """ + Attributes: + id (str): + value (str): + """ + + id: str + value: str + + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + value = self.value + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "id": id, + "value": value, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + value = d.pop("value") + + extension_parameter_value = cls( + id=id, + value=value, + ) + + return extension_parameter_value + diff --git a/exasol/saas/client/openapi/models/extension_version.py b/exasol/saas/client/openapi/models/extension_version.py new file mode 100644 index 0000000..f409a7b --- /dev/null +++ b/exasol/saas/client/openapi/models/extension_version.py @@ -0,0 +1,81 @@ +from typing import ( + TYPE_CHECKING, + Any, + BinaryIO, + Dict, + Optional, + TextIO, + Tuple, + Type, + TypeVar, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import ( + UNSET, + Unset, +) + +T = TypeVar("T", bound="ExtensionVersion") + + +@_attrs_define +class ExtensionVersion: + """ + Attributes: + version (str): + latest (bool): + deprecated (bool): + installed (bool): + """ + + version: str + latest: bool + deprecated: bool + installed: bool + + + def to_dict(self) -> Dict[str, Any]: + version = self.version + + latest = self.latest + + deprecated = self.deprecated + + installed = self.installed + + + field_dict: Dict[str, Any] = {} + field_dict.update({ + "version": version, + "latest": latest, + "deprecated": deprecated, + "installed": installed, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + version = d.pop("version") + + latest = d.pop("latest") + + deprecated = d.pop("deprecated") + + installed = d.pop("installed") + + extension_version = cls( + version=version, + latest=latest, + deprecated=deprecated, + installed=installed, + ) + + return extension_version + diff --git a/exasol/saas/client/openapi/models/patch_user.py b/exasol/saas/client/openapi/models/patch_user.py index 6c730ea..7957731 100644 --- a/exasol/saas/client/openapi/models/patch_user.py +++ b/exasol/saas/client/openapi/models/patch_user.py @@ -21,7 +21,7 @@ ) if TYPE_CHECKING: - from ..models.patch_databases import PatchDatabases + from ..models.patch_user_databases import PatchUserDatabases @@ -35,17 +35,17 @@ class PatchUser: """ Attributes: role_id (Union[Unset, str]): - databases (Union[Unset, PatchDatabases]): + databases (Union[Unset, PatchUserDatabases]): db_username (Union[Unset, str]): """ role_id: Union[Unset, str] = UNSET - databases: Union[Unset, 'PatchDatabases'] = UNSET + databases: Union[Unset, 'PatchUserDatabases'] = UNSET db_username: Union[Unset, str] = UNSET def to_dict(self) -> Dict[str, Any]: - from ..models.patch_databases import PatchDatabases + from ..models.patch_user_databases import PatchUserDatabases role_id = self.role_id databases: Union[Unset, Dict[str, Any]] = UNSET @@ -71,16 +71,16 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.patch_databases import PatchDatabases + from ..models.patch_user_databases import PatchUserDatabases d = src_dict.copy() role_id = d.pop("roleID", UNSET) _databases = d.pop("databases", UNSET) - databases: Union[Unset, PatchDatabases] + databases: Union[Unset, PatchUserDatabases] if isinstance(_databases, Unset): databases = UNSET else: - databases = PatchDatabases.from_dict(_databases) + databases = PatchUserDatabases.from_dict(_databases) diff --git a/exasol/saas/client/openapi/models/patch_databases.py b/exasol/saas/client/openapi/models/patch_user_databases.py similarity index 87% rename from exasol/saas/client/openapi/models/patch_databases.py rename to exasol/saas/client/openapi/models/patch_user_databases.py index b881788..296e401 100644 --- a/exasol/saas/client/openapi/models/patch_databases.py +++ b/exasol/saas/client/openapi/models/patch_user_databases.py @@ -20,11 +20,11 @@ Unset, ) -T = TypeVar("T", bound="PatchDatabases") +T = TypeVar("T", bound="PatchUserDatabases") @_attrs_define -class PatchDatabases: +class PatchUserDatabases: """ Attributes: delete (List[str]): @@ -68,10 +68,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: add = cast(List[str], d.pop("add")) - patch_databases = cls( + patch_user_databases = cls( delete=delete, add=add, ) - return patch_databases + return patch_user_databases diff --git a/exasol/saas/client/openapi/models/status.py b/exasol/saas/client/openapi/models/status.py index 126b865..31e94e8 100644 --- a/exasol/saas/client/openapi/models/status.py +++ b/exasol/saas/client/openapi/models/status.py @@ -8,11 +8,13 @@ class Status(str, Enum): ERROR = "error" MAINTENANCE = "maintenance" RUNNING = "running" + SCALING = "scaling" STARTING = "starting" STOPPED = "stopped" STOPPING = "stopping" TOCREATE = "tocreate" TODELETE = "todelete" + TOSCALE = "toscale" TOSTART = "tostart" TOSTOP = "tostop" diff --git a/exasol/saas/client/openapi/models/update_database.py b/exasol/saas/client/openapi/models/update_database.py index 670eb3b..39af431 100644 --- a/exasol/saas/client/openapi/models/update_database.py +++ b/exasol/saas/client/openapi/models/update_database.py @@ -3,6 +3,7 @@ Any, BinaryIO, Dict, + List, Optional, TextIO, Tuple, @@ -29,6 +30,7 @@ class UpdateDatabase: """ name: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -36,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) field_dict.update({ "name": name, }) @@ -53,5 +56,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name=name, ) + update_database.additional_properties = d return update_database + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/exasol/saas/client/openapi/models/get_usage_response_200.py b/exasol/saas/client/openapi/models/usage.py similarity index 67% rename from exasol/saas/client/openapi/models/get_usage_response_200.py rename to exasol/saas/client/openapi/models/usage.py index 358405f..ac31ead 100644 --- a/exasol/saas/client/openapi/models/get_usage_response_200.py +++ b/exasol/saas/client/openapi/models/usage.py @@ -21,25 +21,25 @@ ) if TYPE_CHECKING: - from ..models.usage_database import UsageDatabase + from ..models.usage_additional_property_item import UsageAdditionalPropertyItem -T = TypeVar("T", bound="GetUsageResponse200") +T = TypeVar("T", bound="Usage") @_attrs_define -class GetUsageResponse200: +class Usage: """ """ - additional_properties: Dict[str, List['UsageDatabase']] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List['UsageAdditionalPropertyItem']] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.usage_database import UsageDatabase + from ..models.usage_additional_property_item import UsageAdditionalPropertyItem field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): @@ -58,9 +58,9 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.usage_database import UsageDatabase + from ..models.usage_additional_property_item import UsageAdditionalPropertyItem d = src_dict.copy() - get_usage_response_200 = cls( + usage = cls( ) @@ -69,7 +69,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: additional_property = [] _additional_property = prop_dict for additional_property_item_data in (_additional_property): - additional_property_item = UsageDatabase.from_dict(additional_property_item_data) + additional_property_item = UsageAdditionalPropertyItem.from_dict(additional_property_item_data) @@ -77,17 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: additional_properties[prop_name] = additional_property - get_usage_response_200.additional_properties = additional_properties - return get_usage_response_200 + usage.additional_properties = additional_properties + return usage @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> List['UsageDatabase']: + def __getitem__(self, key: str) -> List['UsageAdditionalPropertyItem']: return self.additional_properties[key] - def __setitem__(self, key: str, value: List['UsageDatabase']) -> None: + def __setitem__(self, key: str, value: List['UsageAdditionalPropertyItem']) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/exasol/saas/client/openapi/models/usage_database.py b/exasol/saas/client/openapi/models/usage_additional_property_item.py similarity index 91% rename from exasol/saas/client/openapi/models/usage_database.py rename to exasol/saas/client/openapi/models/usage_additional_property_item.py index d595f04..b146064 100644 --- a/exasol/saas/client/openapi/models/usage_database.py +++ b/exasol/saas/client/openapi/models/usage_additional_property_item.py @@ -28,11 +28,11 @@ -T = TypeVar("T", bound="UsageDatabase") +T = TypeVar("T", bound="UsageAdditionalPropertyItem") @_attrs_define -class UsageDatabase: +class UsageAdditionalPropertyItem: """ Attributes: id (str): @@ -98,12 +98,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: used_storage = d.pop("usedStorage", UNSET) - usage_database = cls( + usage_additional_property_item = cls( id=id, name=name, clusters=clusters, used_storage=used_storage, ) - return usage_database + return usage_additional_property_item diff --git a/exasol/saas/client/openapi/models/profile.py b/exasol/saas/client/openapi/models/user.py similarity index 97% rename from exasol/saas/client/openapi/models/profile.py rename to exasol/saas/client/openapi/models/user.py index 27e0e7a..a591b67 100644 --- a/exasol/saas/client/openapi/models/profile.py +++ b/exasol/saas/client/openapi/models/user.py @@ -32,11 +32,11 @@ -T = TypeVar("T", bound="Profile") +T = TypeVar("T", bound="User") @_attrs_define -class Profile: +class User: """ Attributes: email (str): @@ -179,7 +179,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: db_username = d.pop("dbUsername", UNSET) - profile = cls( + user = cls( email=email, id=id, created_at=created_at, @@ -193,5 +193,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: db_username=db_username, ) - return profile + return user diff --git a/noxfile.py b/noxfile.py index 1fb4bba..1396c4a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,7 +23,7 @@ def generate_api(session: Session): https://docs.github.com/en/actions/learn-github-actions/variables. #default-environment-variables. """ - silent = "CI" in os.environ + silent = "CI" not in os.environ session.run( "openapi-python-client", "update",