From b15cb6765d29e5a994af4fe18c8571892647ef70 Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 21:53:44 +0000 Subject: [PATCH] chore: regenerate client from OpenAPI spec --- .openapi-generator/FILES | 6 ------ docs/CreateConnectionRequest.md | 1 + docs/CreateDatabaseRequest.md | 2 +- docs/CreateDatabaseResponse.md | 2 +- docs/CreateDatasetRequest.md | 1 + docs/DatabaseDetailResponse.md | 2 +- docs/DatabaseSummary.md | 2 +- docs/DatabasesApi.md | 4 ++-- hotdata/api/databases_api.py | 12 ++++++------ hotdata/models/create_connection_request.py | 11 +++++++++-- hotdata/models/create_database_request.py | 16 ++++++++-------- hotdata/models/create_database_response.py | 18 +++++++++--------- hotdata/models/create_dataset_request.py | 9 ++++++++- hotdata/models/database_detail_response.py | 18 +++++++++--------- hotdata/models/database_summary.py | 18 +++++++++--------- 15 files changed, 66 insertions(+), 56 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 48d091f..3686dda 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -313,10 +313,4 @@ requirements.txt setup.cfg test-requirements.txt test/__init__.py -test/test_database_context_api.py -test/test_database_context_entry.py -test/test_get_database_context_response.py -test/test_list_database_contexts_response.py -test/test_upsert_database_context_request.py -test/test_upsert_database_context_response.py tox.ini diff --git a/docs/CreateConnectionRequest.md b/docs/CreateConnectionRequest.md index 7fbf6e0..f55d1ff 100644 --- a/docs/CreateConnectionRequest.md +++ b/docs/CreateConnectionRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **secret_name** | **str** | Optional reference to a secret by name. If provided, this secret will be used for authentication. Mutually exclusive with `secret_id`. | [optional] **skip_discovery** | **bool** | If true, skip automatic schema discovery after registering the connection. The connection will be created but no tables will be discovered. You can run discovery later via the refresh endpoint. | [optional] **source_type** | **str** | | +**storage_backend** | **str** | Physical storage backend for tables created under this connection. `\"parquet\"` (default) uses the versioned parquet cache. `\"ducklake\"` stores data in a DuckLake catalog in the shared metadata DB configured via `ducklake.metadata_pg_url`; accepted for any source type and requires that pool to be configured. | [optional] ## Example diff --git a/docs/CreateDatabaseRequest.md b/docs/CreateDatabaseRequest.md index 4bbcb75..c4759d2 100644 --- a/docs/CreateDatabaseRequest.md +++ b/docs/CreateDatabaseRequest.md @@ -6,8 +6,8 @@ Request body for POST /databases Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`. | [optional] **expires_at** | **str** | When this database expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"`, `\"48h\"`, or `\"7d\"`. Defaults to `\"24h\"` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. | [optional] +**name** | **str** | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`. Accepts the legacy `description` key as an alias so clients that predate the rename keep populating this field. | [optional] **schemas** | [**List[DatabaseDefaultSchemaDecl]**](DatabaseDefaultSchemaDecl.md) | Optional schemas/tables to declare on the database's auto-created `default` catalog. Mirrors the `config.schemas` field of a managed `POST /v1/connections`. Tables declared here can be loaded via the standard managed-table load endpoint targeting `default_connection_id`. Omitted or empty means the default catalog starts empty. | [optional] ## Example diff --git a/docs/CreateDatabaseResponse.md b/docs/CreateDatabaseResponse.md index 82f03c3..6c4062a 100644 --- a/docs/CreateDatabaseResponse.md +++ b/docs/CreateDatabaseResponse.md @@ -7,9 +7,9 @@ Response body for POST /databases Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **default_connection_id** | **str** | Internal id of the connection that backs this database's `default` catalog. Workspace-level connection endpoints (list, get, health, delete, cache purge) refuse to act on this id — it is exposed only for the managed-tables load endpoint (`POST /v1/connections/{id}/schemas/{s}/tables/{t}/loads`) so callers can publish parquet into tables declared at database-create time. Addressing it directly in SQL is not the recommended path — use `default` inside an `X-Database-Id` scope instead. | -**description** | **str** | | [optional] **expires_at** | **datetime** | When this database expires. | [optional] **id** | **str** | | +**name** | **str** | | [optional] ## Example diff --git a/docs/CreateDatasetRequest.md b/docs/CreateDatasetRequest.md index 72e78e3..db73987 100644 --- a/docs/CreateDatasetRequest.md +++ b/docs/CreateDatasetRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | | **source** | [**DatasetSource**](DatasetSource.md) | | +**storage_backend** | **str** | Optional storage backend: `\"parquet\"` (default) or `\"ducklake\"`. `\"ducklake\"` requires `ducklake.metadata_pg_url` to be configured at engine boot; the engine also rejects the combo of `storage_backend: \"ducklake\"` with a saved-query source or with explicit geometry columns (both deferred to a follow-up). | [optional] **table_name** | **str** | Optional table_name - if not provided, derived from label | [optional] ## Example diff --git a/docs/DatabaseDetailResponse.md b/docs/DatabaseDetailResponse.md index f2699cb..2de9bd5 100644 --- a/docs/DatabaseDetailResponse.md +++ b/docs/DatabaseDetailResponse.md @@ -8,9 +8,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attachments** | [**List[DatabaseAttachmentInfo]**](DatabaseAttachmentInfo.md) | | **default_connection_id** | **str** | | -**description** | **str** | | [optional] **expires_at** | **datetime** | When this database expires. | [optional] **id** | **str** | | +**name** | **str** | | [optional] ## Example diff --git a/docs/DatabaseSummary.md b/docs/DatabaseSummary.md index 83395f0..3fc1247 100644 --- a/docs/DatabaseSummary.md +++ b/docs/DatabaseSummary.md @@ -6,9 +6,9 @@ Summary item in GET /databases Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] **expires_at** | **datetime** | | [optional] **id** | **str** | | +**name** | **str** | | [optional] ## Example diff --git a/docs/DatabasesApi.md b/docs/DatabasesApi.md index cdb854d..b2ffa65 100644 --- a/docs/DatabasesApi.md +++ b/docs/DatabasesApi.md @@ -105,7 +105,7 @@ void (empty response body) Create database -Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. +Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. ### Example @@ -360,7 +360,7 @@ void (empty response body) Get database -Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here. +Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here. ### Example diff --git a/hotdata/api/databases_api.py b/hotdata/api/databases_api.py index 15315bb..b27b407 100644 --- a/hotdata/api/databases_api.py +++ b/hotdata/api/databases_api.py @@ -360,7 +360,7 @@ def create_database( ) -> CreateDatabaseResponse: """Create database - Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. + Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. :param create_database_request: (required) :type create_database_request: CreateDatabaseRequest @@ -429,7 +429,7 @@ def create_database_with_http_info( ) -> ApiResponse[CreateDatabaseResponse]: """Create database - Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. + Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. :param create_database_request: (required) :type create_database_request: CreateDatabaseRequest @@ -498,7 +498,7 @@ def create_database_without_preload_content( ) -> RESTResponseType: """Create database - Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. + Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. :param create_database_request: (required) :type create_database_request: CreateDatabaseRequest @@ -1186,7 +1186,7 @@ def get_database( ) -> DatabaseDetailResponse: """Get database - Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here. + Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here. :param database_id: Database ID (required) :type database_id: str @@ -1254,7 +1254,7 @@ def get_database_with_http_info( ) -> ApiResponse[DatabaseDetailResponse]: """Get database - Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here. + Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here. :param database_id: Database ID (required) :type database_id: str @@ -1322,7 +1322,7 @@ def get_database_without_preload_content( ) -> RESTResponseType: """Get database - Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here. + Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here. :param database_id: Database ID (required) :type database_id: str diff --git a/hotdata/models/create_connection_request.py b/hotdata/models/create_connection_request.py index 8ec308a..6044185 100644 --- a/hotdata/models/create_connection_request.py +++ b/hotdata/models/create_connection_request.py @@ -33,7 +33,8 @@ class CreateConnectionRequest(BaseModel): secret_name: Optional[StrictStr] = Field(default=None, description="Optional reference to a secret by name. If provided, this secret will be used for authentication. Mutually exclusive with `secret_id`.") skip_discovery: Optional[StrictBool] = Field(default=None, description="If true, skip automatic schema discovery after registering the connection. The connection will be created but no tables will be discovered. You can run discovery later via the refresh endpoint.") source_type: StrictStr - __properties: ClassVar[List[str]] = ["config", "name", "secret_id", "secret_name", "skip_discovery", "source_type"] + storage_backend: Optional[StrictStr] = Field(default=None, description="Physical storage backend for tables created under this connection. `\"parquet\"` (default) uses the versioned parquet cache. `\"ducklake\"` stores data in a DuckLake catalog in the shared metadata DB configured via `ducklake.metadata_pg_url`; accepted for any source type and requires that pool to be configured.") + __properties: ClassVar[List[str]] = ["config", "name", "secret_id", "secret_name", "skip_discovery", "source_type", "storage_backend"] model_config = ConfigDict( populate_by_name=True, @@ -84,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]: if self.secret_name is None and "secret_name" in self.model_fields_set: _dict['secret_name'] = None + # set to None if storage_backend (nullable) is None + # and model_fields_set contains the field + if self.storage_backend is None and "storage_backend" in self.model_fields_set: + _dict['storage_backend'] = None + return _dict @classmethod @@ -101,7 +107,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "secret_id": obj.get("secret_id"), "secret_name": obj.get("secret_name"), "skip_discovery": obj.get("skip_discovery"), - "source_type": obj.get("source_type") + "source_type": obj.get("source_type"), + "storage_backend": obj.get("storage_backend") }) return _obj diff --git a/hotdata/models/create_database_request.py b/hotdata/models/create_database_request.py index 001c98e..5d0e07c 100644 --- a/hotdata/models/create_database_request.py +++ b/hotdata/models/create_database_request.py @@ -28,10 +28,10 @@ class CreateDatabaseRequest(BaseModel): """ Request body for POST /databases """ # noqa: E501 - description: Optional[StrictStr] = Field(default=None, description="Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`.") expires_at: Optional[StrictStr] = Field(default=None, description="When this database expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"`, `\"48h\"`, or `\"7d\"`. Defaults to `\"24h\"` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.") + name: Optional[StrictStr] = Field(default=None, description="Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`. Accepts the legacy `description` key as an alias so clients that predate the rename keep populating this field.") schemas: Optional[List[DatabaseDefaultSchemaDecl]] = Field(default=None, description="Optional schemas/tables to declare on the database's auto-created `default` catalog. Mirrors the `config.schemas` field of a managed `POST /v1/connections`. Tables declared here can be loaded via the standard managed-table load endpoint targeting `default_connection_id`. Omitted or empty means the default catalog starts empty.") - __properties: ClassVar[List[str]] = ["description", "expires_at", "schemas"] + __properties: ClassVar[List[str]] = ["expires_at", "name", "schemas"] model_config = ConfigDict( populate_by_name=True, @@ -79,16 +79,16 @@ def to_dict(self) -> Dict[str, Any]: if _item_schemas: _items.append(_item_schemas.to_dict()) _dict['schemas'] = _items - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: _dict['expires_at'] = None + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + return _dict @classmethod @@ -101,8 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "description": obj.get("description"), "expires_at": obj.get("expires_at"), + "name": obj.get("name"), "schemas": [DatabaseDefaultSchemaDecl.from_dict(_item) for _item in obj["schemas"]] if obj.get("schemas") is not None else None }) return _obj diff --git a/hotdata/models/create_database_response.py b/hotdata/models/create_database_response.py index 62422ee..84bf231 100644 --- a/hotdata/models/create_database_response.py +++ b/hotdata/models/create_database_response.py @@ -29,10 +29,10 @@ class CreateDatabaseResponse(BaseModel): Response body for POST /databases """ # noqa: E501 default_connection_id: StrictStr = Field(description="Internal id of the connection that backs this database's `default` catalog. Workspace-level connection endpoints (list, get, health, delete, cache purge) refuse to act on this id — it is exposed only for the managed-tables load endpoint (`POST /v1/connections/{id}/schemas/{s}/tables/{t}/loads`) so callers can publish parquet into tables declared at database-create time. Addressing it directly in SQL is not the recommended path — use `default` inside an `X-Database-Id` scope instead.") - description: Optional[StrictStr] = None expires_at: Optional[datetime] = Field(default=None, description="When this database expires.") id: StrictStr - __properties: ClassVar[List[str]] = ["default_connection_id", "description", "expires_at", "id"] + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["default_connection_id", "expires_at", "id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -73,16 +73,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: _dict['expires_at'] = None + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + return _dict @classmethod @@ -96,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "default_connection_id": obj.get("default_connection_id"), - "description": obj.get("description"), "expires_at": obj.get("expires_at"), - "id": obj.get("id") + "id": obj.get("id"), + "name": obj.get("name") }) return _obj diff --git a/hotdata/models/create_dataset_request.py b/hotdata/models/create_dataset_request.py index f70e5ee..babc79c 100644 --- a/hotdata/models/create_dataset_request.py +++ b/hotdata/models/create_dataset_request.py @@ -30,8 +30,9 @@ class CreateDatasetRequest(BaseModel): """ # noqa: E501 label: StrictStr source: DatasetSource + storage_backend: Optional[StrictStr] = Field(default=None, description="Optional storage backend: `\"parquet\"` (default) or `\"ducklake\"`. `\"ducklake\"` requires `ducklake.metadata_pg_url` to be configured at engine boot; the engine also rejects the combo of `storage_backend: \"ducklake\"` with a saved-query source or with explicit geometry columns (both deferred to a follow-up).") table_name: Optional[StrictStr] = Field(default=None, description="Optional table_name - if not provided, derived from label") - __properties: ClassVar[List[str]] = ["label", "source", "table_name"] + __properties: ClassVar[List[str]] = ["label", "source", "storage_backend", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of source if self.source: _dict['source'] = self.source.to_dict() + # set to None if storage_backend (nullable) is None + # and model_fields_set contains the field + if self.storage_backend is None and "storage_backend" in self.model_fields_set: + _dict['storage_backend'] = None + # set to None if table_name (nullable) is None # and model_fields_set contains the field if self.table_name is None and "table_name" in self.model_fields_set: @@ -94,6 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "label": obj.get("label"), "source": DatasetSource.from_dict(obj["source"]) if obj.get("source") is not None else None, + "storage_backend": obj.get("storage_backend"), "table_name": obj.get("table_name") }) return _obj diff --git a/hotdata/models/database_detail_response.py b/hotdata/models/database_detail_response.py index 5ad9bf7..e403ae4 100644 --- a/hotdata/models/database_detail_response.py +++ b/hotdata/models/database_detail_response.py @@ -31,10 +31,10 @@ class DatabaseDetailResponse(BaseModel): """ # noqa: E501 attachments: List[DatabaseAttachmentInfo] default_connection_id: StrictStr - description: Optional[StrictStr] = None expires_at: Optional[datetime] = Field(default=None, description="When this database expires.") id: StrictStr - __properties: ClassVar[List[str]] = ["attachments", "default_connection_id", "description", "expires_at", "id"] + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["attachments", "default_connection_id", "expires_at", "id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -82,16 +82,16 @@ def to_dict(self) -> Dict[str, Any]: if _item_attachments: _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: _dict['expires_at'] = None + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + return _dict @classmethod @@ -106,9 +106,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "attachments": [DatabaseAttachmentInfo.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, "default_connection_id": obj.get("default_connection_id"), - "description": obj.get("description"), "expires_at": obj.get("expires_at"), - "id": obj.get("id") + "id": obj.get("id"), + "name": obj.get("name") }) return _obj diff --git a/hotdata/models/database_summary.py b/hotdata/models/database_summary.py index bc29cde..2312598 100644 --- a/hotdata/models/database_summary.py +++ b/hotdata/models/database_summary.py @@ -28,10 +28,10 @@ class DatabaseSummary(BaseModel): """ Summary item in GET /databases """ # noqa: E501 - description: Optional[StrictStr] = None expires_at: Optional[datetime] = None id: StrictStr - __properties: ClassVar[List[str]] = ["description", "expires_at", "id"] + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["expires_at", "id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -72,16 +72,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: _dict['expires_at'] = None + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + return _dict @classmethod @@ -94,9 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "description": obj.get("description"), "expires_at": obj.get("expires_at"), - "id": obj.get("id") + "id": obj.get("id"), + "name": obj.get("name") }) return _obj