Skip to content

Commit 95053e9

Browse files
authored
[create-pull-request] automated change (#124)
Co-authored-by: yejiyang <[email protected]>
1 parent 86bfa27 commit 95053e9

File tree

9 files changed

+293
-224
lines changed

9 files changed

+293
-224
lines changed

field-manager-python-client/field_manager_python_client/api/projects/update_project_projects_project_id_put.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def sync_detailed(
6969
7070
Update a project with passed project_in.
7171
72-
If srid is changed, then all location values are transformed from the old srid to the new srid.
72+
If srid is changed, then all location and cross section values are transformed from the old srid to
73+
the new srid.
7374
The location should not move on the map.
7475
7576
Args:
@@ -107,7 +108,8 @@ def sync(
107108
108109
Update a project with passed project_in.
109110
110-
If srid is changed, then all location values are transformed from the old srid to the new srid.
111+
If srid is changed, then all location and cross section values are transformed from the old srid to
112+
the new srid.
111113
The location should not move on the map.
112114
113115
Args:
@@ -140,7 +142,8 @@ async def asyncio_detailed(
140142
141143
Update a project with passed project_in.
142144
143-
If srid is changed, then all location values are transformed from the old srid to the new srid.
145+
If srid is changed, then all location and cross section values are transformed from the old srid to
146+
the new srid.
144147
The location should not move on the map.
145148
146149
Args:
@@ -176,7 +179,8 @@ async def asyncio(
176179
177180
Update a project with passed project_in.
178181
179-
If srid is changed, then all location values are transformed from the old srid to the new srid.
182+
If srid is changed, then all location and cross section values are transformed from the old srid to
183+
the new srid.
180184
The location should not move on the map.
181185
182186
Args:

field-manager-python-client/field_manager_python_client/api/users/get_user_users_user_id_get.py

Lines changed: 0 additions & 151 deletions
This file was deleted.

field-manager-python-client/field_manager_python_client/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from .file import File
4545
from .file_extended import FileExtended
4646
from .file_extension import FileExtension
47+
from .file_min import FileMin
4748
from .file_type import FileType
4849
from .file_update import FileUpdate
4950
from .fm_plot_options import FMPlotOptions
@@ -293,6 +294,7 @@
293294
"File",
294295
"FileExtended",
295296
"FileExtension",
297+
"FileMin",
296298
"FileType",
297299
"FileUpdate",
298300
"FMPlotOptions",
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
from collections.abc import Mapping
2+
from typing import Any, TypeVar, Union, cast
3+
from uuid import UUID
4+
5+
from attrs import define as _attrs_define
6+
from attrs import field as _attrs_field
7+
8+
from ..types import UNSET, Unset
9+
10+
T = TypeVar("T", bound="FileMin")
11+
12+
13+
@_attrs_define
14+
class FileMin:
15+
"""
16+
Attributes:
17+
file_id (UUID):
18+
blob_url (str):
19+
original_filename (str):
20+
size (Union[None, Unset, int]):
21+
"""
22+
23+
file_id: UUID
24+
blob_url: str
25+
original_filename: str
26+
size: Union[None, Unset, int] = UNSET
27+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28+
29+
def to_dict(self) -> dict[str, Any]:
30+
file_id = str(self.file_id)
31+
32+
blob_url = self.blob_url
33+
34+
original_filename = self.original_filename
35+
36+
size: Union[None, Unset, int]
37+
if isinstance(self.size, Unset):
38+
size = UNSET
39+
else:
40+
size = self.size
41+
42+
field_dict: dict[str, Any] = {}
43+
field_dict.update(self.additional_properties)
44+
field_dict.update(
45+
{
46+
"file_id": file_id,
47+
"blob_url": blob_url,
48+
"original_filename": original_filename,
49+
}
50+
)
51+
if size is not UNSET:
52+
field_dict["size"] = size
53+
54+
return field_dict
55+
56+
@classmethod
57+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
58+
d = dict(src_dict)
59+
file_id = UUID(d.pop("file_id"))
60+
61+
blob_url = d.pop("blob_url")
62+
63+
original_filename = d.pop("original_filename")
64+
65+
def _parse_size(data: object) -> Union[None, Unset, int]:
66+
if data is None:
67+
return data
68+
if isinstance(data, Unset):
69+
return data
70+
return cast(Union[None, Unset, int], data)
71+
72+
size = _parse_size(d.pop("size", UNSET))
73+
74+
file_min = cls(
75+
file_id=file_id,
76+
blob_url=blob_url,
77+
original_filename=original_filename,
78+
size=size,
79+
)
80+
81+
file_min.additional_properties = d
82+
return file_min
83+
84+
@property
85+
def additional_keys(self) -> list[str]:
86+
return list(self.additional_properties.keys())
87+
88+
def __getitem__(self, key: str) -> Any:
89+
return self.additional_properties[key]
90+
91+
def __setitem__(self, key: str, value: Any) -> None:
92+
self.additional_properties[key] = value
93+
94+
def __delitem__(self, key: str) -> None:
95+
del self.additional_properties[key]
96+
97+
def __contains__(self, key: str) -> bool:
98+
return key in self.additional_properties

field-manager-python-client/field_manager_python_client/models/shape.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from ..types import UNSET, Unset
1212

1313
if TYPE_CHECKING:
14+
from ..models.file_min import FileMin
1415
from ..models.sub_shape import SubShape
1516

1617

@@ -24,6 +25,7 @@ class Shape:
2425
shape_id (UUID):
2526
project_id (UUID):
2627
input_geometry_file_id (UUID):
28+
input_geometry_file (FileMin):
2729
attached_file_ids (list[UUID]):
2830
created_at (datetime.datetime):
2931
updated_at (datetime.datetime):
@@ -38,6 +40,7 @@ class Shape:
3840
shape_id: UUID
3941
project_id: UUID
4042
input_geometry_file_id: UUID
43+
input_geometry_file: "FileMin"
4144
attached_file_ids: list[UUID]
4245
created_at: datetime.datetime
4346
updated_at: datetime.datetime
@@ -56,6 +59,8 @@ def to_dict(self) -> dict[str, Any]:
5659

5760
input_geometry_file_id = str(self.input_geometry_file_id)
5861

62+
input_geometry_file = self.input_geometry_file.to_dict()
63+
5964
attached_file_ids = []
6065
for attached_file_ids_item_data in self.attached_file_ids:
6166
attached_file_ids_item = str(attached_file_ids_item_data)
@@ -100,6 +105,7 @@ def to_dict(self) -> dict[str, Any]:
100105
"shape_id": shape_id,
101106
"project_id": project_id,
102107
"input_geometry_file_id": input_geometry_file_id,
108+
"input_geometry_file": input_geometry_file,
103109
"attached_file_ids": attached_file_ids,
104110
"created_at": created_at,
105111
"updated_at": updated_at,
@@ -119,6 +125,7 @@ def to_dict(self) -> dict[str, Any]:
119125

120126
@classmethod
121127
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
128+
from ..models.file_min import FileMin
122129
from ..models.sub_shape import SubShape
123130

124131
d = dict(src_dict)
@@ -128,6 +135,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
128135

129136
input_geometry_file_id = UUID(d.pop("input_geometry_file_id"))
130137

138+
input_geometry_file = FileMin.from_dict(d.pop("input_geometry_file"))
139+
131140
attached_file_ids = []
132141
_attached_file_ids = d.pop("attached_file_ids")
133142
for attached_file_ids_item_data in _attached_file_ids:
@@ -187,6 +196,7 @@ def _parse_color(data: object) -> Union[None, ShapeColor, Unset]:
187196
shape_id=shape_id,
188197
project_id=project_id,
189198
input_geometry_file_id=input_geometry_file_id,
199+
input_geometry_file=input_geometry_file,
190200
attached_file_ids=attached_file_ids,
191201
created_at=created_at,
192202
updated_at=updated_at,

field-manager-python-client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "field-manager-python-client"
3-
version = "4.6.38"
3+
version = "4.6.45"
44
description = "A client library for accessing Field Manager Data API"
55
authors = ["Jiyang Ye <[email protected]>"]
66
maintainers = ["Jiyang Ye <[email protected]>", "Jostein Leira <[email protected]>"]

0 commit comments

Comments
 (0)