Skip to content

Commit 8de9eae

Browse files
committed
PATCH: rename model 360 field (#576)
* rename model 360 field * keep viewer_360_file field * remove useless field in write only serializer
1 parent b0d09fe commit 8de9eae

14 files changed

Lines changed: 58 additions & 33 deletions

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 {'DWG', 'POINT_CLOUD', 'BFX', 'OBJ', 'IFC', 'DXF', 'DAE', '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 {'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
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/api/ifc_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10577,7 +10577,7 @@ def __init__(self, api_client=None):
1057710577
'gltf_file',
1057810578
'gltf_with_openings_file',
1057910579
'bvh_tree_file',
10580-
'viewer_360_file',
10580+
'preview_file',
1058110581
'xkt_file',
1058210582
],
1058310583
'required': [
@@ -10592,7 +10592,7 @@ def __init__(self, api_client=None):
1059210592
'gltf_file',
1059310593
'gltf_with_openings_file',
1059410594
'bvh_tree_file',
10595-
'viewer_360_file',
10595+
'preview_file',
1059610596
'xkt_file',
1059710597
],
1059810598
'enum': [
@@ -10624,7 +10624,7 @@ def __init__(self, api_client=None):
1062410624
(file_type, none_type,),
1062510625
'bvh_tree_file':
1062610626
(file_type, none_type,),
10627-
'viewer_360_file':
10627+
'preview_file':
1062810628
(file_type, none_type,),
1062910629
'xkt_file':
1063010630
(file_type, none_type,),
@@ -10639,7 +10639,7 @@ def __init__(self, api_client=None):
1063910639
'gltf_file': 'gltf_file',
1064010640
'gltf_with_openings_file': 'gltf_with_openings_file',
1064110641
'bvh_tree_file': 'bvh_tree_file',
10642-
'viewer_360_file': 'viewer_360_file',
10642+
'preview_file': 'preview_file',
1064310643
'xkt_file': 'xkt_file',
1064410644
},
1064510645
'location_map': {
@@ -10652,7 +10652,7 @@ def __init__(self, api_client=None):
1065210652
'gltf_file': 'form',
1065310653
'gltf_with_openings_file': 'form',
1065410654
'bvh_tree_file': 'form',
10655-
'viewer_360_file': 'form',
10655+
'preview_file': 'form',
1065610656
'xkt_file': 'form',
1065710657
},
1065810658
'collection_format_map': {
@@ -24604,7 +24604,7 @@ def update_ifc_files_deprecated(
2460424604
gltf_file (file_type, none_type): [optional]
2460524605
gltf_with_openings_file (file_type, none_type): [optional]
2460624606
bvh_tree_file (file_type, none_type): [optional]
24607-
viewer_360_file (file_type, none_type): [optional]
24607+
preview_file (file_type, none_type): [optional]
2460824608
xkt_file (file_type, none_type): [optional]
2460924609
_return_http_data_only (bool): response data without head status
2461024610
code and headers. Default is True.

bimdata_api_client/api/model_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9819,7 +9819,7 @@ def __init__(self, api_client=None):
98199819
'gltf_file',
98209820
'gltf_with_openings_file',
98219821
'bvh_tree_file',
9822-
'viewer_360_file',
9822+
'preview_file',
98239823
'xkt_file',
98249824
],
98259825
'required': [
@@ -9834,7 +9834,7 @@ def __init__(self, api_client=None):
98349834
'gltf_file',
98359835
'gltf_with_openings_file',
98369836
'bvh_tree_file',
9837-
'viewer_360_file',
9837+
'preview_file',
98389838
'xkt_file',
98399839
],
98409840
'enum': [
@@ -9866,7 +9866,7 @@ def __init__(self, api_client=None):
98669866
(file_type, none_type,),
98679867
'bvh_tree_file':
98689868
(file_type, none_type,),
9869-
'viewer_360_file':
9869+
'preview_file':
98709870
(file_type, none_type,),
98719871
'xkt_file':
98729872
(file_type, none_type,),
@@ -9881,7 +9881,7 @@ def __init__(self, api_client=None):
98819881
'gltf_file': 'gltf_file',
98829882
'gltf_with_openings_file': 'gltf_with_openings_file',
98839883
'bvh_tree_file': 'bvh_tree_file',
9884-
'viewer_360_file': 'viewer_360_file',
9884+
'preview_file': 'preview_file',
98859885
'xkt_file': 'xkt_file',
98869886
},
98879887
'location_map': {
@@ -9894,7 +9894,7 @@ def __init__(self, api_client=None):
98949894
'gltf_file': 'form',
98959895
'gltf_with_openings_file': 'form',
98969896
'bvh_tree_file': 'form',
9897-
'viewer_360_file': 'form',
9897+
'preview_file': 'form',
98989898
'xkt_file': 'form',
98999899
},
99009900
'collection_format_map': {
@@ -22858,7 +22858,7 @@ def update_model_files(
2285822858
gltf_file (file_type, none_type): [optional]
2285922859
gltf_with_openings_file (file_type, none_type): [optional]
2286022860
bvh_tree_file (file_type, none_type): [optional]
22861-
viewer_360_file (file_type, none_type): [optional]
22861+
preview_file (file_type, none_type): [optional]
2286222862
xkt_file (file_type, none_type): [optional]
2286322863
_return_http_data_only (bool): response data without head status
2286422864
code and headers. Default is True.

bimdata_api_client/model/model.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ def openapi_types():
136136
'map_file': (str, none_type,), # noqa: E501
137137
'gltf_file': (str, none_type,), # noqa: E501
138138
'bvh_tree_file': (str, none_type,), # noqa: E501
139-
'viewer_360_file': (str, none_type,), # noqa: E501
139+
'preview_file': (str, none_type,), # noqa: E501
140+
'viewer_360_file': (str,), # noqa: E501
140141
'xkt_file': (str, none_type,), # noqa: E501
141142
'project_id': (int, none_type,), # noqa: E501
142143
'errors': ([str], none_type,), # noqa: E501
@@ -170,6 +171,7 @@ def discriminator():
170171
'map_file': 'map_file', # noqa: E501
171172
'gltf_file': 'gltf_file', # noqa: E501
172173
'bvh_tree_file': 'bvh_tree_file', # noqa: E501
174+
'preview_file': 'preview_file', # noqa: E501
173175
'viewer_360_file': 'viewer_360_file', # noqa: E501
174176
'xkt_file': 'xkt_file', # noqa: E501
175177
'project_id': 'project_id', # noqa: E501
@@ -199,7 +201,7 @@ def discriminator():
199201
'map_file', # noqa: E501
200202
'gltf_file', # noqa: E501
201203
'bvh_tree_file', # noqa: E501
202-
'viewer_360_file', # noqa: E501
204+
'preview_file', # noqa: E501
203205
'xkt_file', # noqa: E501
204206
'project_id', # noqa: E501
205207
'errors', # noqa: E501
@@ -210,7 +212,7 @@ def discriminator():
210212

211213
@classmethod
212214
@convert_js_args_to_python_args
213-
def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, bvh_tree_file, viewer_360_file, xkt_file, project_id, errors, warnings, *args, **kwargs): # noqa: E501
215+
def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, document_id, document, structure_file, systems_file, map_file, gltf_file, bvh_tree_file, preview_file, viewer_360_file, xkt_file, project_id, errors, warnings, *args, **kwargs): # noqa: E501
214216
"""Model - a model defined in OpenAPI
215217
216218
Args:
@@ -227,7 +229,8 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
227229
map_file (str, none_type):
228230
gltf_file (str, none_type):
229231
bvh_tree_file (str, none_type):
230-
viewer_360_file (str, none_type):
232+
preview_file (str, none_type):
233+
viewer_360_file (str): DEPRECATED: Use 'preview_file' instead.
231234
xkt_file (str, none_type):
232235
project_id (int, none_type):
233236
errors ([str], none_type): List of errors that happened during IFC processing
@@ -312,6 +315,7 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
312315
self.map_file = map_file
313316
self.gltf_file = gltf_file
314317
self.bvh_tree_file = bvh_tree_file
318+
self.preview_file = preview_file
315319
self.viewer_360_file = viewer_360_file
316320
self.xkt_file = xkt_file
317321
self.project_id = project_id
@@ -337,9 +341,10 @@ def _from_openapi_data(cls, id, type, creator, status, created_at, updated_at, d
337341
])
338342

339343
@convert_js_args_to_python_args
340-
def __init__(self, *args, **kwargs): # noqa: E501
344+
def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
341345
"""Model - a model defined in OpenAPI
342346
347+
viewer_360_file (str): DEPRECATED: Use 'preview_file' instead.
343348
Keyword Args:
344349
_check_type (bool): if True, values for parameters in openapi_types
345350
will be type checked and a TypeError will be
@@ -404,6 +409,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
404409
self._configuration = _configuration
405410
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
406411

412+
self.viewer_360_file = viewer_360_file
407413
for var_name, var_value in kwargs.items():
408414
if var_name not in self.attribute_map and \
409415
self._configuration is not None and \

bimdata_api_client/model/model_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def openapi_types():
8888
'gltf_file': (str, none_type,), # noqa: E501
8989
'gltf_with_openings_file': (str, none_type,), # noqa: E501
9090
'bvh_tree_file': (str, none_type,), # noqa: E501
91-
'viewer_360_file': (str, none_type,), # noqa: E501
91+
'preview_file': (str, none_type,), # noqa: E501
9292
'xkt_file': (str, none_type,), # noqa: E501
9393
}
9494

@@ -104,7 +104,7 @@ def discriminator():
104104
'gltf_file': 'gltf_file', # noqa: E501
105105
'gltf_with_openings_file': 'gltf_with_openings_file', # noqa: E501
106106
'bvh_tree_file': 'bvh_tree_file', # noqa: E501
107-
'viewer_360_file': 'viewer_360_file', # noqa: E501
107+
'preview_file': 'preview_file', # noqa: E501
108108
'xkt_file': 'xkt_file', # noqa: E501
109109
}
110110

@@ -155,7 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
155155
gltf_file (str, none_type): [optional] # noqa: E501
156156
gltf_with_openings_file (str, none_type): [optional] # noqa: E501
157157
bvh_tree_file (str, none_type): [optional] # noqa: E501
158-
viewer_360_file (str, none_type): [optional] # noqa: E501
158+
preview_file (str, none_type): [optional] # noqa: E501
159159
xkt_file (str, none_type): [optional] # noqa: E501
160160
"""
161161

@@ -244,7 +244,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
244244
gltf_file (str, none_type): [optional] # noqa: E501
245245
gltf_with_openings_file (str, none_type): [optional] # noqa: E501
246246
bvh_tree_file (str, none_type): [optional] # noqa: E501
247-
viewer_360_file (str, none_type): [optional] # noqa: E501
247+
preview_file (str, none_type): [optional] # noqa: E501
248248
xkt_file (str, none_type): [optional] # noqa: E501
249249
"""
250250

bimdata_api_client/model/model_request.py

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

118119

119120
attribute_map = {
121+
'viewer_360_file': 'viewer_360_file', # noqa: E501
120122
'name': 'name', # noqa: E501
121123
'source': 'source', # noqa: E501
122124
'world_position': 'world_position', # noqa: E501
@@ -134,9 +136,12 @@ def discriminator():
134136

135137
@classmethod
136138
@convert_js_args_to_python_args
137-
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
139+
def _from_openapi_data(cls, viewer_360_file, *args, **kwargs): # noqa: E501
138140
"""ModelRequest - a model defined in OpenAPI
139141
142+
Args:
143+
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.
144+
140145
Keyword Args:
141146
_check_type (bool): if True, values for parameters in openapi_types
142147
will be type checked and a TypeError will be
@@ -203,6 +208,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
203208
self._configuration = _configuration
204209
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
205210

211+
self.viewer_360_file = viewer_360_file
206212
for var_name, var_value in kwargs.items():
207213
if var_name not in self.attribute_map and \
208214
self._configuration is not None and \
@@ -223,9 +229,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
223229
])
224230

225231
@convert_js_args_to_python_args
226-
def __init__(self, *args, **kwargs): # noqa: E501
232+
def __init__(self, viewer_360_file, *args, **kwargs): # noqa: E501
227233
"""ModelRequest - a model defined in OpenAPI
228234
235+
Args:
236+
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.
237+
229238
Keyword Args:
230239
_check_type (bool): if True, values for parameters in openapi_types
231240
will be type checked and a TypeError will be
@@ -290,6 +299,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
290299
self._configuration = _configuration
291300
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
292301

302+
self.viewer_360_file = viewer_360_file
293303
for var_name, var_value in kwargs.items():
294304
if var_name not in self.attribute_map and \
295305
self._configuration is not None and \

bimdata_api_client/model/patched_model_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ 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
106107
'world_position': ([float], none_type,), # noqa: E501
107108
'size_ratio': (float, none_type,), # noqa: E501
108109
'archived': (bool,), # noqa: E501
@@ -119,6 +120,7 @@ def discriminator():
119120
attribute_map = {
120121
'name': 'name', # noqa: E501
121122
'source': 'source', # noqa: E501
123+
'viewer_360_file': 'viewer_360_file', # noqa: E501
122124
'world_position': 'world_position', # noqa: E501
123125
'size_ratio': 'size_ratio', # noqa: E501
124126
'archived': 'archived', # noqa: E501
@@ -170,6 +172,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
170172
_visited_composed_classes = (Animal,)
171173
name (str, none_type): [optional] # noqa: E501
172174
source (str): [optional] # noqa: E501
175+
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.. [optional] # noqa: E501
173176
world_position ([float], none_type): [x,y,z] array of the position of the local_placement in world coordinates. [optional] # noqa: E501
174177
size_ratio (float, none_type): How many meters a unit represents. [optional] # noqa: E501
175178
archived (bool): [optional] # noqa: E501
@@ -259,6 +262,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
259262
_visited_composed_classes = (Animal,)
260263
name (str, none_type): [optional] # noqa: E501
261264
source (str): [optional] # noqa: E501
265+
viewer_360_file (file_type): DEPRECATED: Use 'preview_file' instead.. [optional] # noqa: E501
262266
world_position ([float], none_type): [x,y,z] array of the position of the local_placement in world coordinates. [optional] # noqa: E501
263267
size_ratio (float, none_type): How many meters a unit represents. [optional] # noqa: E501
264268
archived (bool): [optional] # noqa: E501

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 {'DWG', 'POINT_CLOUD', 'BFX', 'OBJ', 'IFC', 'DXF', 'DAE', '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 {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
14221422

14231423
### Example
14241424

docs/IfcApi.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16347,6 +16347,7 @@ 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'),
1635016351
world_position=[
1635116352
3.14,
1635216353
],
@@ -16484,7 +16485,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1648416485
gltf_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
1648516486
gltf_with_openings_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
1648616487
bvh_tree_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
16487-
viewer_360_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
16488+
preview_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
1648816489
xkt_file = open('/path/to/file', 'rb') # file_type, none_type | (optional)
1648916490

1649016491
# example passing only required values which don't have defaults set
@@ -16499,7 +16500,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1649916500
# and optional values
1650016501
try:
1650116502
# Update models file (gltf, svg, structure, etc)
16502-
api_response = api_instance.update_ifc_files_deprecated(cloud_pk, id, project_pk, structure_file=structure_file, systems_file=systems_file, map_file=map_file, gltf_file=gltf_file, gltf_with_openings_file=gltf_with_openings_file, bvh_tree_file=bvh_tree_file, viewer_360_file=viewer_360_file, xkt_file=xkt_file)
16503+
api_response = api_instance.update_ifc_files_deprecated(cloud_pk, id, project_pk, structure_file=structure_file, systems_file=systems_file, map_file=map_file, gltf_file=gltf_file, gltf_with_openings_file=gltf_with_openings_file, bvh_tree_file=bvh_tree_file, preview_file=preview_file, xkt_file=xkt_file)
1650316504
pprint(api_response)
1650416505
except bimdata_api_client.ApiException as e:
1650516506
print("Exception when calling IfcApi->update_ifc_files_deprecated: %s\n" % e)
@@ -16519,7 +16520,7 @@ Name | Type | Description | Notes
1651916520
**gltf_file** | **file_type, none_type**| | [optional]
1652016521
**gltf_with_openings_file** | **file_type, none_type**| | [optional]
1652116522
**bvh_tree_file** | **file_type, none_type**| | [optional]
16522-
**viewer_360_file** | **file_type, none_type**| | [optional]
16523+
**preview_file** | **file_type, none_type**| | [optional]
1652316524
**xkt_file** | **file_type, none_type**| | [optional]
1652416525

1652516526
### Return type

docs/Model.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Name | Type | Description | Notes
1717
**map_file** | **str, none_type** | | [readonly]
1818
**gltf_file** | **str, none_type** | | [readonly]
1919
**bvh_tree_file** | **str, none_type** | | [readonly]
20-
**viewer_360_file** | **str, none_type** | | [readonly]
20+
**preview_file** | **str, none_type** | | [readonly]
21+
**viewer_360_file** | **str** | DEPRECATED: Use 'preview_file' instead. |
2122
**xkt_file** | **str, none_type** | | [readonly]
2223
**project_id** | **int, none_type** | | [readonly]
2324
**errors** | **[str], none_type** | List of errors that happened during IFC processing | [readonly]

0 commit comments

Comments
 (0)