Skip to content

Commit 21ff206

Browse files
Automatically update python client (ref: Cosmo-Tech/cosmotech-api@927fde9)
Co-authored-by: Leopold-Cramer <Leopold-Cramer@users.noreply.github.com>
1 parent 1671bb8 commit 21ff206

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

cosmotech_api/models/dataset_part_update_request.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, StrictStr
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2222
from typing import Any, ClassVar, Dict, List, Optional
23+
from typing_extensions import Annotated
2324
from typing import Optional, Set
2425
from typing_extensions import Self
2526

2627
class DatasetPartUpdateRequest(BaseModel):
2728
"""
2829
Dataset part update request object
2930
""" # noqa: E501
31+
source_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="the source data name (e.g. filename associated to the dataset part)", alias="sourceName")
3032
description: Optional[StrictStr] = None
3133
tags: Optional[List[StrictStr]] = None
32-
__properties: ClassVar[List[str]] = ["description", "tags"]
34+
__properties: ClassVar[List[str]] = ["sourceName", "description", "tags"]
3335

3436
model_config = ConfigDict(
3537
populate_by_name=True,
@@ -82,6 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8284
return cls.model_validate(obj)
8385

8486
_obj = cls.model_validate({
87+
"sourceName": obj.get("sourceName"),
8588
"description": obj.get("description"),
8689
"tags": obj.get("tags")
8790
})

docs/DatasetPartUpdateRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Dataset part update request object
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9+
**source_name** | **str** | the source data name (e.g. filename associated to the dataset part) | [optional]
910
**description** | **str** | | [optional]
1011
**tags** | **List[str]** | | [optional]
1112

test/test_dataset_part_update_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> DatasetPartUpdateRequest:
3636
model = DatasetPartUpdateRequest()
3737
if include_optional:
3838
return DatasetPartUpdateRequest(
39+
source_name = '0',
3940
description = '',
4041
tags = [
4142
''

0 commit comments

Comments
 (0)