Skip to content

Commit 623b8f6

Browse files
committed
PATCH: fix model deserialization
1 parent 4718828 commit 623b8f6

File tree

14 files changed

+15
-34
lines changed

14 files changed

+15
-34
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8027,7 +8027,7 @@ def create_document(
80278027
):
80288028
"""Create a document # noqa: E501
80298029

8030-
Create a document. If the document is one of {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
8030+
Create a document. If the document is one of {'DXF', 'DAE', 'OBJ', 'BFX', 'IFC', 'DWG', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
80318031
This method makes a synchronous HTTP request by default. To make an
80328032
asynchronous HTTP request, please pass async_req=True
80338033

bimdata_api_client/model/full_topic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def openapi_types():
106106
"""
107107
lazy_import()
108108
return {
109-
'modified_date': (datetime,), # noqa: E501
109+
'modified_date': (datetime, none_type,), # noqa: E501
110110
'title': (str,), # noqa: E501
111111
'project': (int,), # noqa: E501
112112
'guid': (str,), # noqa: E501
@@ -172,7 +172,7 @@ def _from_openapi_data(cls, modified_date, title, project, *args, **kwargs): #
172172
"""FullTopic - a model defined in OpenAPI
173173
174174
Args:
175-
modified_date (datetime):
175+
modified_date (datetime, none_type):
176176
title (str):
177177
project (int):
178178

bimdata_api_client/model/model.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def openapi_types():
137137
'gltf_file': (str, none_type,), # noqa: E501
138138
'bvh_tree_file': (str, none_type,), # noqa: E501
139139
'preview_file': (str, none_type,), # noqa: E501
140-
'viewer_360_file': (str,), # noqa: E501
140+
'viewer_360_file': (str, none_type,), # noqa: E501
141141
'xkt_file': (str, none_type,), # noqa: E501
142142
'project_id': (int, none_type,), # noqa: E501
143143
'errors': ([str], none_type,), # noqa: E501
@@ -202,6 +202,7 @@ def discriminator():
202202
'gltf_file', # noqa: E501
203203
'bvh_tree_file', # noqa: E501
204204
'preview_file', # noqa: E501
205+
'viewer_360_file', # noqa: E501
205206
'xkt_file', # noqa: E501
206207
'project_id', # noqa: E501
207208
'errors', # noqa: E501
@@ -230,7 +231,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
230231
gltf_file (str, none_type):
231232
bvh_tree_file (str, none_type):
232233
preview_file (str, none_type):
233-
viewer_360_file (str): DEPRECATED: Use 'preview_file' instead.
234+
viewer_360_file (str, none_type): DEPRECATED: Use 'preview_file' instead.
234235
xkt_file (str, none_type):
235236
project_id (int, none_type):
236237
errors ([str], none_type): List of errors that happened during IFC processing
@@ -341,10 +342,9 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
341342
])
342343

343344
@convert_js_args_to_python_args
344-
def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
345+
def __init__(self, *args, **kwargs): # noqa: E501
345346
"""Model - a model defined in OpenAPI
346347
347-
viewer_360_file (str): DEPRECATED: Use 'preview_file' instead.
348348
Keyword Args:
349349
_check_type (bool): if True, values for parameters in openapi_types
350350
will be type checked and a TypeError will be
@@ -409,7 +409,6 @@ def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
409409
self._configuration = _configuration
410410
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
411411

412-
self.viewer_360_file = viewer_360_file
413412
for var_name, var_value in kwargs.items():
414413
if var_name not in self.attribute_map and \
415414
self._configuration is not None and \

bimdata_api_client/model/model_request.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ def openapi_types():
101101
and the value is attribute type.
102102
"""
103103
return {
104-
'viewer_360_file': (file_type,), # noqa: E501
105104
'name': (str, none_type,), # noqa: E501
106105
'source': (str,), # noqa: E501
107106
'world_position': ([float], none_type,), # noqa: E501
@@ -118,7 +117,6 @@ def discriminator():
118117

119118

120119
attribute_map = {
121-
'viewer_360_file': 'viewer_360_file', # noqa: E501
122120
'name': 'name', # noqa: E501
123121
'source': 'source', # noqa: E501
124122
'world_position': 'world_position', # noqa: E501
@@ -136,12 +134,9 @@ def discriminator():
136134

137135
@classmethod
138136
@convert_js_args_to_python_args
139-
def _from_openapi_data(cls, viewer_360_file, *args, **kwargs): # noqa: E501
137+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
140138
"""ModelRequest - a model defined in OpenAPI
141139
142-
Args:
143-
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.
144-
145140
Keyword Args:
146141
_check_type (bool): if True, values for parameters in openapi_types
147142
will be type checked and a TypeError will be
@@ -208,7 +203,6 @@ def _from_openapi_data(cls, viewer_360_file, *args, **kwargs): # noqa: E501
208203
self._configuration = _configuration
209204
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
210205

211-
self.viewer_360_file = viewer_360_file
212206
for var_name, var_value in kwargs.items():
213207
if var_name not in self.attribute_map and \
214208
self._configuration is not None and \
@@ -229,12 +223,9 @@ def _from_openapi_data(cls, viewer_360_file, *args, **kwargs): # noqa: E501
229223
])
230224

231225
@convert_js_args_to_python_args
232-
def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
226+
def __init__(self, *args, **kwargs): # noqa: E501
233227
"""ModelRequest - a model defined in OpenAPI
234228
235-
Args:
236-
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.
237-
238229
Keyword Args:
239230
_check_type (bool): if True, values for parameters in openapi_types
240231
will be type checked and a TypeError will be
@@ -299,7 +290,6 @@ def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
299290
self._configuration = _configuration
300291
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
301292

302-
self.viewer_360_file = viewer_360_file
303293
for var_name, var_value in kwargs.items():
304294
if var_name not in self.attribute_map and \
305295
self._configuration is not None and \

bimdata_api_client/model/patched_model_request.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def openapi_types():
103103
return {
104104
'name': (str, none_type,), # noqa: E501
105105
'source': (str,), # noqa: E501
106-
'viewer_360_file': (file_type,), # noqa: E501
107106
'world_position': ([float], none_type,), # noqa: E501
108107
'size_ratio': (float, none_type,), # noqa: E501
109108
'archived': (bool,), # noqa: E501
@@ -120,7 +119,6 @@ def discriminator():
120119
attribute_map = {
121120
'name': 'name', # noqa: E501
122121
'source': 'source', # noqa: E501
123-
'viewer_360_file': 'viewer_360_file', # noqa: E501
124122
'world_position': 'world_position', # noqa: E501
125123
'size_ratio': 'size_ratio', # noqa: E501
126124
'archived': 'archived', # noqa: E501
@@ -172,7 +170,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
172170
_visited_composed_classes = (Animal,)
173171
name (str, none_type): [optional] # noqa: E501
174172
source (str): [optional] # noqa: E501
175-
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.. [optional] # noqa: E501
176173
world_position ([float], none_type): [x,y,z] array of the position of the local_placement in world coordinates. [optional] # noqa: E501
177174
size_ratio (float, none_type): How many meters a unit represents. [optional] # noqa: E501
178175
archived (bool): [optional] # noqa: E501
@@ -262,7 +259,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
262259
_visited_composed_classes = (Animal,)
263260
name (str, none_type): [optional] # noqa: E501
264261
source (str): [optional] # noqa: E501
265-
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.. [optional] # noqa: E501
266262
world_position ([float], none_type): [x,y,z] array of the position of the local_placement in world coordinates. [optional] # noqa: E501
267263
size_ratio (float, none_type): How many meters a unit represents. [optional] # noqa: E501
268264
archived (bool): [optional] # noqa: E501

bimdata_api_client/model/topic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def openapi_types():
9999
"""
100100
return {
101101
'title': (str,), # noqa: E501
102-
'modified_date': (datetime,), # noqa: E501
102+
'modified_date': (datetime, none_type,), # noqa: E501
103103
'project': (int,), # noqa: E501
104104
'guid': (str,), # noqa: E501
105105
'topic_type': (str, none_type,), # noqa: E501
@@ -161,7 +161,7 @@ def _from_openapi_data(cls, title, modified_date, project, *args, **kwargs): #
161161
162162
Args:
163163
title (str):
164-
modified_date (datetime):
164+
modified_date (datetime, none_type):
165165
project (int):
166166
167167
Keyword Args:

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ Name | Type | Description | Notes
14181418
14191419
Create a document
14201420

1421-
Create a document. If the document is one of {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
1421+
Create a document. If the document is one of {'DXF', 'DAE', 'OBJ', 'BFX', 'IFC', 'DWG', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
14221422

14231423
### Example
14241424

docs/FullTopic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**modified_date** | **datetime** | | [readonly]
7+
**modified_date** | **datetime, none_type** | | [readonly]
88
**title** | **str** | |
99
**project** | **int** | |
1010
**guid** | **str** | | [optional]

docs/IfcApi.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16347,7 +16347,6 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1634716347
patched_model_request = PatchedModelRequest(
1634816348
name="name_example",
1634916349
source="UPLOAD",
16350-
viewer_360_file=open('/path/to/file', 'rb'),
1635116350
world_position=[
1635216351
3.14,
1635316352
],

docs/Model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
1818
**gltf_file** | **str, none_type** | | [readonly]
1919
**bvh_tree_file** | **str, none_type** | | [readonly]
2020
**preview_file** | **str, none_type** | | [readonly]
21-
**viewer_360_file** | **str** | DEPRECATED: Use 'preview_file' instead. |
21+
**viewer_360_file** | **str, none_type** | DEPRECATED: Use 'preview_file' instead. | [readonly]
2222
**xkt_file** | **str, none_type** | | [readonly]
2323
**project_id** | **int, none_type** | | [readonly]
2424
**errors** | **[str], none_type** | List of errors that happened during IFC processing | [readonly]

0 commit comments

Comments
 (0)