Skip to content

Commit c3e3213

Browse files
committed
MINOR: Improve fragment status handling (#1020)
* Improve fragment status handling. * Better implementation
1 parent a3b0796 commit c3e3213

18 files changed

Lines changed: 80 additions & 68 deletions

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9344,7 +9344,7 @@ def create_document(
93449344
):
93459345
"""Create a document # noqa: E501
93469346

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

bimdata_api_client/api/model_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27443,7 +27443,7 @@ def update_model_files(
2744327443
preview_file (file_type, none_type): [optional]
2744427444
xkt_file (file_type, none_type): DEPRECATED. xkt file url is now in xkt_files field with its version number. [optional]
2744527445
fragments_file (file_type, none_type): [optional]
27446-
binary_2d_file (file_type, none_type): [optional]
27446+
binary_2d_file (file_type, none_type): DEPRECATED. This field is only used for old DWG files.. [optional]
2744727447
_return_http_data_only (bool): response data without head status
2744827448
code and headers. Default is True.
2744927449
_preload_content (bool): if False, the urllib3.HTTPResponse object

bimdata_api_client/model/document_text.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'FRENCH': "french",
6261
'SPANISH': "spanish",
63-
'GERMAN': "german",
64-
'ITALIAN': "italian",
6562
'ENGLISH': "english",
63+
'ITALIAN': "italian",
64+
'GERMAN': "german",
65+
'FRENCH': "french",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
156+
language (str, none_type): * `spanish` - spanish * `english` - english * `italian` - italian * `german` - german * `french` - french. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
240+
language (str, none_type): * `spanish` - spanish * `english` - english * `italian` - italian * `german` - german * `french` - french. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/log_entry.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def openapi_types():
8787
return {
8888
'id': (int,), # noqa: E501
8989
'user_id': (int, none_type,), # noqa: E501
90-
'user_email': (str,), # noqa: E501
91-
'app_name': (str,), # noqa: E501
90+
'user_email': (str, none_type,), # noqa: E501
91+
'app_name': (str, none_type,), # noqa: E501
9292
'project_name': (str,), # noqa: E501
9393
'date': (datetime,), # noqa: E501
9494
'action': (str,), # noqa: E501
@@ -127,8 +127,8 @@ def _from_openapi_data(cls, id, user_id, user_email, app_name, project_name, dat
127127
Args:
128128
id (int):
129129
user_id (int, none_type):
130-
user_email (str):
131-
app_name (str):
130+
user_email (str, none_type):
131+
app_name (str, none_type):
132132
project_name (str):
133133
date (datetime):
134134
action (str):
@@ -223,8 +223,8 @@ def _from_openapi_data(cls, id, user_id, user_email, app_name, project_name, dat
223223
def __init__(self, user_email, app_name, project_name, action, description, *args, **kwargs): # noqa: E501
224224
"""LogEntry - a model defined in OpenAPI
225225
226-
user_email (str):
227-
app_name (str):
226+
user_email (str, none_type):
227+
app_name (str, none_type):
228228
project_name (str):
229229
action (str):
230230
description (bool, date, datetime, dict, float, int, list, str, none_type):

bimdata_api_client/model/model.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def openapi_types():
138138
'type': (str,), # noqa: E501
139139
'creator': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
140140
'status': (str,), # noqa: E501
141+
'fragments_status': (str,), # noqa: E501
141142
'created_at': (datetime,), # noqa: E501
142143
'updated_at': (datetime,), # noqa: E501
143144
'document_id': (int, none_type,), # noqa: E501
@@ -181,6 +182,7 @@ def discriminator():
181182
'type': 'type', # noqa: E501
182183
'creator': 'creator', # noqa: E501
183184
'status': 'status', # noqa: E501
185+
'fragments_status': 'fragments_status', # noqa: E501
184186
'created_at': 'created_at', # noqa: E501
185187
'updated_at': 'updated_at', # noqa: E501
186188
'document_id': 'document_id', # noqa: E501
@@ -219,6 +221,7 @@ def discriminator():
219221
'type', # noqa: E501
220222
'creator', # noqa: E501
221223
'status', # noqa: E501
224+
'fragments_status', # noqa: E501
222225
'created_at', # noqa: E501
223226
'updated_at', # noqa: E501
224227
'document_id', # noqa: E501
@@ -247,14 +250,15 @@ def discriminator():
247250

248251
@classmethod
249252
@convert_js_args_to_python_args
250-
def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, preview_file, viewer_360_file, xkt_file, xkt_files, fragments_file, binary_2d_file, project_id, errors, warnings, parent_id, page_number, mask_2d, transform, children, *args, **kwargs): # noqa: E501
253+
def _from_openapi_data(cls, id, type, creator, status, fragments_status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, preview_file, viewer_360_file, xkt_file, xkt_files, fragments_file, binary_2d_file, project_id, errors, warnings, parent_id, page_number, mask_2d, transform, children, *args, **kwargs): # noqa: E501
251254
"""Model - a model defined in OpenAPI
252255
253256
Args:
254257
id (int):
255258
type (str): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `PHOTOSPHERE` - PHOTOSPHERE * `METABUILDING` - METABUILDING * `PHOTOSPHERE_BUILDING` - PHOTOSPHERE_BUILDING
256259
creator (bool, date, datetime, dict, float, int, list, str, none_type):
257260
status (str):
261+
fragments_status (str): Status of the fragments process. This field may be removed in future versions when the `status` will take fragments into account.
258262
created_at (datetime):
259263
updated_at (datetime):
260264
document_id (int, none_type):
@@ -268,7 +272,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
268272
xkt_file (str, none_type): DEPRECATED: Use 'xkt_files' instead. This field only respond with xkt v6 files
269273
xkt_files ([XktFile]):
270274
fragments_file (str, none_type):
271-
binary_2d_file (str, none_type):
275+
binary_2d_file (str, none_type): DEPRECATED. This field is only used for old DWG files.
272276
project_id (int, none_type):
273277
errors ([str], none_type): List of errors that happened during IFC processing
274278
warnings ([str], none_type): List of warnings that happened during IFC processing
@@ -349,6 +353,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
349353
self.type = type
350354
self.creator = creator
351355
self.status = status
356+
self.fragments_status = fragments_status
352357
self.created_at = created_at
353358
self.updated_at = updated_at
354359
self.document_id = document_id

bimdata_api_client/model/model_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
156156
preview_file (str, none_type): [optional] # noqa: E501
157157
xkt_file (str, none_type): DEPRECATED. xkt file url is now in xkt_files field with its version number. [optional] # noqa: E501
158158
fragments_file (str, none_type): [optional] # noqa: E501
159-
binary_2d_file (str, none_type): [optional] # noqa: E501
159+
binary_2d_file (str, none_type): DEPRECATED. This field is only used for old DWG files.. [optional] # noqa: E501
160160
"""
161161

162162
_check_type = kwargs.pop('_check_type', True)
@@ -245,7 +245,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
245245
preview_file (str, none_type): [optional] # noqa: E501
246246
xkt_file (str, none_type): DEPRECATED. xkt file url is now in xkt_files field with its version number. [optional] # noqa: E501
247247
fragments_file (str, none_type): [optional] # noqa: E501
248-
binary_2d_file (str, none_type): [optional] # noqa: E501
248+
binary_2d_file (str, none_type): DEPRECATED. This field is only used for old DWG files.. [optional] # noqa: E501
249249
"""
250250

251251
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/model_serializer_without_children.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def openapi_types():
136136
'type': (str,), # noqa: E501
137137
'creator': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
138138
'status': (str,), # noqa: E501
139+
'fragments_status': (str,), # noqa: E501
139140
'created_at': (datetime,), # noqa: E501
140141
'updated_at': (datetime,), # noqa: E501
141142
'document_id': (int, none_type,), # noqa: E501
@@ -178,6 +179,7 @@ def discriminator():
178179
'type': 'type', # noqa: E501
179180
'creator': 'creator', # noqa: E501
180181
'status': 'status', # noqa: E501
182+
'fragments_status': 'fragments_status', # noqa: E501
181183
'created_at': 'created_at', # noqa: E501
182184
'updated_at': 'updated_at', # noqa: E501
183185
'document_id': 'document_id', # noqa: E501
@@ -215,6 +217,7 @@ def discriminator():
215217
'type', # noqa: E501
216218
'creator', # noqa: E501
217219
'status', # noqa: E501
220+
'fragments_status', # noqa: E501
218221
'created_at', # noqa: E501
219222
'updated_at', # noqa: E501
220223
'document_id', # noqa: E501
@@ -242,14 +245,15 @@ def discriminator():
242245

243246
@classmethod
244247
@convert_js_args_to_python_args
245-
def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, preview_file, viewer_360_file, xkt_file, xkt_files, fragments_file, binary_2d_file, project_id, errors, warnings, parent_id, page_number, mask_2d, transform, *args, **kwargs): # noqa: E501
248+
def _from_openapi_data(cls, id, type, creator, status, fragments_status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, preview_file, viewer_360_file, xkt_file, xkt_files, fragments_file, binary_2d_file, project_id, errors, warnings, parent_id, page_number, mask_2d, transform, *args, **kwargs): # noqa: E501
246249
"""ModelSerializerWithoutChildren - a model defined in OpenAPI
247250
248251
Args:
249252
id (int):
250253
type (str): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `PHOTOSPHERE` - PHOTOSPHERE * `METABUILDING` - METABUILDING * `PHOTOSPHERE_BUILDING` - PHOTOSPHERE_BUILDING
251254
creator (bool, date, datetime, dict, float, int, list, str, none_type):
252255
status (str):
256+
fragments_status (str): Status of the fragments process. This field may be removed in future versions when the `status` will take fragments into account.
253257
created_at (datetime):
254258
updated_at (datetime):
255259
document_id (int, none_type):
@@ -263,7 +267,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
263267
xkt_file (str, none_type): DEPRECATED: Use 'xkt_files' instead. This field only respond with xkt v6 files
264268
xkt_files ([XktFile]):
265269
fragments_file (str, none_type):
266-
binary_2d_file (str, none_type):
270+
binary_2d_file (str, none_type): DEPRECATED. This field is only used for old DWG files.
267271
project_id (int, none_type):
268272
errors ([str], none_type): List of errors that happened during IFC processing
269273
warnings ([str], none_type): List of warnings that happened during IFC processing
@@ -343,6 +347,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
343347
self.type = type
344348
self.creator = creator
345349
self.status = status
350+
self.fragments_status = fragments_status
346351
self.created_at = created_at
347352
self.updated_at = updated_at
348353
self.document_id = document_id

bimdata_api_client/model/patched_document_text_request.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class PatchedDocumentTextRequest(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'FRENCH': "french",
6261
'SPANISH': "spanish",
63-
'GERMAN': "german",
64-
'ITALIAN': "italian",
6562
'ENGLISH': "english",
63+
'ITALIAN': "italian",
64+
'GERMAN': "german",
65+
'FRENCH': "french",
6666
'NULL': "null",
6767
},
6868
}
@@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
147147
through its discriminator because we passed in
148148
_visited_composed_classes = (Animal,)
149149
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
150-
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
150+
language (str, none_type): * `spanish` - spanish * `english` - english * `italian` - italian * `german` - german * `french` - french. [optional] # noqa: E501
151151
"""
152152

153153
_check_type = kwargs.pop('_check_type', True)
@@ -230,7 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
230230
through its discriminator because we passed in
231231
_visited_composed_classes = (Animal,)
232232
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
233-
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
233+
language (str, none_type): * `spanish` - spanish * `english` - english * `italian` - italian * `german` - german * `french` - french. [optional] # noqa: E501
234234
"""
235235

236236
_check_type = kwargs.pop('_check_type', True)

0 commit comments

Comments
 (0)