Skip to content

Commit 68bc812

Browse files
committed
MINOR: add routes to manage zone_space relations (#690)
1 parent f5764a5 commit 68bc812

File tree

14 files changed

+943
-18
lines changed

14 files changed

+943
-18
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ bimdata_api_client/model/xkt_file.py
250250
bimdata_api_client/model/zone.py
251251
bimdata_api_client/model/zone_request.py
252252
bimdata_api_client/model/zone_space.py
253+
bimdata_api_client/model/zone_space_relation_request.py
253254
bimdata_api_client/model/zone_space_request.py
254255
bimdata_api_client/model_utils.py
255256
bimdata_api_client/models/__init__.py
@@ -495,6 +496,7 @@ docs/XktFile.md
495496
docs/Zone.md
496497
docs/ZoneRequest.md
497498
docs/ZoneSpace.md
499+
docs/ZoneSpaceRelationRequest.md
498500
docs/ZoneSpaceRequest.md
499501
git_push.sh
500502
requirements.txt
@@ -741,4 +743,5 @@ test/test_xkt_file.py
741743
test/test_zone.py
742744
test/test_zone_request.py
743745
test/test_zone_space.py
746+
test/test_zone_space_relation_request.py
744747
test/test_zone_space_request.py

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ Class | Method | HTTP request | Description
331331
*CollaborationApi* | [**update_visa**](docs/CollaborationApi.md#update_visa) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{id} | Update some fields of a visa
332332
*CollaborationApi* | [**update_visa_comment**](docs/CollaborationApi.md#update_visa_comment) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/comment/{id} | Update some fields of a comment
333333
*IfcApi* | [**add_ifc_errors_deprecated**](docs/IfcApi.md#add_ifc_errors_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/errors | Add errors to model
334+
*IfcApi* | [**add_zone_space_deprecated**](docs/IfcApi.md#add_zone_space_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/add | Add a space to a zone
334335
*IfcApi* | [**bulk_delete_ifc_classifications_deprecated**](docs/IfcApi.md#bulk_delete_ifc_classifications_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/classification/list_destroy | Remove all classifications from model's elements
335336
*IfcApi* | [**bulk_delete_ifc_properties_deprecated**](docs/IfcApi.md#bulk_delete_ifc_properties_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/property/bulk_destroy | Delete many Property of a model
336337
*IfcApi* | [**bulk_delete_ifc_property_definitions_deprecated**](docs/IfcApi.md#bulk_delete_ifc_property_definitions_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertydefinition/bulk_destroy | Delete many PropertyDefinitions of a model
@@ -386,7 +387,7 @@ Class | Method | HTTP request | Description
386387
*IfcApi* | [**delete_storey_plan_deprecated**](docs/IfcApi.md#delete_storey_plan_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/storey/{storey_uuid}/plan/{id} | Delete the relation between a 2d model and a storey
387388
*IfcApi* | [**delete_system_deprecated**](docs/IfcApi.md#delete_system_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/system/{uuid} | Delete a system of a model
388389
*IfcApi* | [**delete_zone_deprecated**](docs/IfcApi.md#delete_zone_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{id} | Delete a zone of a model
389-
*IfcApi* | [**delete_zone_space_deprecated**](docs/IfcApi.md#delete_zone_space_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/{id} | Delete a space of a zone
390+
*IfcApi* | [**delete_zone_space_deprecated**](docs/IfcApi.md#delete_zone_space_deprecated) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/{id} | Delete the relation between a space and a zone
390391
*IfcApi* | [**export_ifc_deprecated**](docs/IfcApi.md#export_ifc_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/export | Export IFC
391392
*IfcApi* | [**full_update_element_deprecated**](docs/IfcApi.md#full_update_element_deprecated) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/element/{uuid} | Update all fields of an element
392393
*IfcApi* | [**get_access_token_deprecated**](docs/IfcApi.md#get_access_token_deprecated) | **GET** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/access_token/{token} | Retrieve one token created for this model
@@ -478,6 +479,7 @@ Class | Method | HTTP request | Description
478479
*IfcApi* | [**update_zone_deprecated**](docs/IfcApi.md#update_zone_deprecated) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{id} | Update some fields of a zone
479480
*IfcApi* | [**update_zone_space_deprecated**](docs/IfcApi.md#update_zone_space_deprecated) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/{id} | Update some fields of a space
480481
*ModelApi* | [**add_model_errors**](docs/ModelApi.md#add_model_errors) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{id}/errors | Add errors to model
482+
*ModelApi* | [**add_zone_space**](docs/ModelApi.md#add_zone_space) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{zone_pk}/space/add | Add a space to a zone
481483
*ModelApi* | [**bulk_delete_model_classifications**](docs/ModelApi.md#bulk_delete_model_classifications) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/classification/list_destroy | Remove all classifications from model's elements
482484
*ModelApi* | [**bulk_delete_model_properties**](docs/ModelApi.md#bulk_delete_model_properties) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/property/bulk_destroy | Delete many Property of a model
483485
*ModelApi* | [**bulk_delete_model_property_definitions**](docs/ModelApi.md#bulk_delete_model_property_definitions) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertydefinition/bulk_destroy | Delete many PropertyDefinitions of a model
@@ -533,7 +535,7 @@ Class | Method | HTTP request | Description
533535
*ModelApi* | [**delete_storey_plan**](docs/ModelApi.md#delete_storey_plan) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/storey/{storey_uuid}/plan/{id} | Delete the relation between a 2d model and a storey
534536
*ModelApi* | [**delete_system**](docs/ModelApi.md#delete_system) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/system/{uuid} | Delete a system of a model
535537
*ModelApi* | [**delete_zone**](docs/ModelApi.md#delete_zone) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{id} | Delete a zone of a model
536-
*ModelApi* | [**delete_zone_space**](docs/ModelApi.md#delete_zone_space) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{zone_pk}/space/{id} | Delete a space of a zone
538+
*ModelApi* | [**delete_zone_space**](docs/ModelApi.md#delete_zone_space) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{zone_pk}/space/{id} | Delete the relation between a space and a zone
537539
*ModelApi* | [**export_ifc**](docs/ModelApi.md#export_ifc) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{id}/export | Export IFC
538540
*ModelApi* | [**full_update_element**](docs/ModelApi.md#full_update_element) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/element/{uuid} | Update all fields of an element
539541
*ModelApi* | [**get_access_token**](docs/ModelApi.md#get_access_token) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/access_token/{token} | Retrieve one token created for this model
@@ -875,6 +877,7 @@ Class | Method | HTTP request | Description
875877
- [Zone](docs/Zone.md)
876878
- [ZoneRequest](docs/ZoneRequest.md)
877879
- [ZoneSpace](docs/ZoneSpace.md)
880+
- [ZoneSpaceRelationRequest](docs/ZoneSpaceRelationRequest.md)
878881
- [ZoneSpaceRequest](docs/ZoneSpaceRequest.md)
879882

880883

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8298,7 +8298,7 @@ def create_document(
82988298
):
82998299
"""Create a document # noqa: E501
83008300

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

bimdata_api_client/api/ifc_api.py

Lines changed: 178 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
from bimdata_api_client.model.zone import Zone
8888
from bimdata_api_client.model.zone_request import ZoneRequest
8989
from bimdata_api_client.model.zone_space import ZoneSpace
90+
from bimdata_api_client.model.zone_space_relation_request import ZoneSpaceRelationRequest
9091
from bimdata_api_client.model.zone_space_request import ZoneSpaceRequest
9192

9293

@@ -175,6 +176,87 @@ def __init__(self, api_client=None):
175176
},
176177
api_client=api_client
177178
)
179+
self.add_zone_space_deprecated_endpoint = _Endpoint(
180+
settings={
181+
'response_type': (ZoneSpace,),
182+
'auth': [
183+
'ApiKey',
184+
'BIMData_Connect',
185+
'BIMData_Connect',
186+
'Bearer'
187+
],
188+
'endpoint_path': '/cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/add',
189+
'operation_id': 'add_zone_space_deprecated',
190+
'http_method': 'POST',
191+
'servers': None,
192+
},
193+
params_map={
194+
'all': [
195+
'cloud_pk',
196+
'ifc_pk',
197+
'project_pk',
198+
'zone_pk',
199+
'zone_space_relation_request',
200+
],
201+
'required': [
202+
'cloud_pk',
203+
'ifc_pk',
204+
'project_pk',
205+
'zone_pk',
206+
'zone_space_relation_request',
207+
],
208+
'nullable': [
209+
],
210+
'enum': [
211+
],
212+
'validation': [
213+
]
214+
},
215+
root_map={
216+
'validations': {
217+
},
218+
'allowed_values': {
219+
},
220+
'openapi_types': {
221+
'cloud_pk':
222+
(int,),
223+
'ifc_pk':
224+
(int,),
225+
'project_pk':
226+
(int,),
227+
'zone_pk':
228+
(int,),
229+
'zone_space_relation_request':
230+
(ZoneSpaceRelationRequest,),
231+
},
232+
'attribute_map': {
233+
'cloud_pk': 'cloud_pk',
234+
'ifc_pk': 'ifc_pk',
235+
'project_pk': 'project_pk',
236+
'zone_pk': 'zone_pk',
237+
},
238+
'location_map': {
239+
'cloud_pk': 'path',
240+
'ifc_pk': 'path',
241+
'project_pk': 'path',
242+
'zone_pk': 'path',
243+
'zone_space_relation_request': 'body',
244+
},
245+
'collection_format_map': {
246+
}
247+
},
248+
headers_map={
249+
'accept': [
250+
'application/json'
251+
],
252+
'content_type': [
253+
'application/json',
254+
'application/x-www-form-urlencoded',
255+
'multipart/form-data'
256+
]
257+
},
258+
api_client=api_client
259+
)
178260
self.bulk_delete_ifc_classifications_deprecated_endpoint = _Endpoint(
179261
settings={
180262
'response_type': None,
@@ -11352,6 +11434,100 @@ def add_ifc_errors_deprecated(
1135211434
project_pk
1135311435
return self.add_ifc_errors_deprecated_endpoint.call_with_http_info(**kwargs)
1135411436

11437+
def add_zone_space_deprecated(
11438+
self,
11439+
cloud_pk,
11440+
ifc_pk,
11441+
project_pk,
11442+
zone_pk,
11443+
zone_space_relation_request,
11444+
**kwargs
11445+
):
11446+
"""Add a space to a zone # noqa: E501
11447+
11448+
Add a space to a zone. The IFC file will not be updated. The created space will be accessible over the API and when exporting an IFC file Required scopes: ifc:write, model:write # noqa: E501
11449+
This method makes a synchronous HTTP request by default. To make an
11450+
asynchronous HTTP request, please pass async_req=True
11451+
11452+
>>> thread = api.add_zone_space_deprecated(cloud_pk, ifc_pk, project_pk, zone_pk, zone_space_relation_request, async_req=True)
11453+
>>> result = thread.get()
11454+
11455+
Args:
11456+
cloud_pk (int): A unique integer value identifying this cloud.
11457+
ifc_pk (int): A unique integer value identifying this model.
11458+
project_pk (int): A unique integer value identifying this project.
11459+
zone_pk (int): A unique integer value identifying this zone.
11460+
zone_space_relation_request (ZoneSpaceRelationRequest):
11461+
11462+
Keyword Args:
11463+
_return_http_data_only (bool): response data without head status
11464+
code and headers. Default is True.
11465+
_preload_content (bool): if False, the urllib3.HTTPResponse object
11466+
will be returned without reading/decoding response data.
11467+
Default is True.
11468+
_request_timeout (int/float/tuple): timeout setting for this request. If
11469+
one number provided, it will be total request timeout. It can also
11470+
be a pair (tuple) of (connection, read) timeouts.
11471+
Default is None.
11472+
_check_input_type (bool): specifies if type checking
11473+
should be done one the data sent to the server.
11474+
Default is True.
11475+
_check_return_type (bool): specifies if type checking
11476+
should be done one the data received from the server.
11477+
Default is True.
11478+
_spec_property_naming (bool): True if the variable names in the input data
11479+
are serialized names, as specified in the OpenAPI document.
11480+
False if the variable names in the input data
11481+
are pythonic names, e.g. snake case (default)
11482+
_content_type (str/None): force body content-type.
11483+
Default is None and content-type will be predicted by allowed
11484+
content-types and body.
11485+
_host_index (int/None): specifies the index of the server
11486+
that we want to use.
11487+
Default is read from the configuration.
11488+
async_req (bool): execute request asynchronously
11489+
11490+
Returns:
11491+
ZoneSpace
11492+
If the method is called asynchronously, returns the request
11493+
thread.
11494+
"""
11495+
kwargs['async_req'] = kwargs.get(
11496+
'async_req', False
11497+
)
11498+
kwargs['_return_http_data_only'] = kwargs.get(
11499+
'_return_http_data_only', True
11500+
)
11501+
kwargs['_preload_content'] = kwargs.get(
11502+
'_preload_content', True
11503+
)
11504+
kwargs['_request_timeout'] = kwargs.get(
11505+
'_request_timeout', None
11506+
)
11507+
kwargs['_check_input_type'] = kwargs.get(
11508+
'_check_input_type', True
11509+
)
11510+
kwargs['_check_return_type'] = kwargs.get(
11511+
'_check_return_type', True
11512+
)
11513+
kwargs['_spec_property_naming'] = kwargs.get(
11514+
'_spec_property_naming', False
11515+
)
11516+
kwargs['_content_type'] = kwargs.get(
11517+
'_content_type')
11518+
kwargs['_host_index'] = kwargs.get('_host_index')
11519+
kwargs['cloud_pk'] = \
11520+
cloud_pk
11521+
kwargs['ifc_pk'] = \
11522+
ifc_pk
11523+
kwargs['project_pk'] = \
11524+
project_pk
11525+
kwargs['zone_pk'] = \
11526+
zone_pk
11527+
kwargs['zone_space_relation_request'] = \
11528+
zone_space_relation_request
11529+
return self.add_zone_space_deprecated_endpoint.call_with_http_info(**kwargs)
11530+
1135511531
def bulk_delete_ifc_classifications_deprecated(
1135611532
self,
1135711533
cloud_pk,
@@ -16369,9 +16545,9 @@ def delete_zone_space_deprecated(
1636916545
zone_pk,
1637016546
**kwargs
1637116547
):
16372-
"""Delete a space of a zone # noqa: E501
16548+
"""Delete the relation between a space and a zone # noqa: E501
1637316549

16374-
The IFC file will not be updated. The remaining spaces are available in API and will be available when exporting an IFC file Required scopes: ifc:write, model:write # noqa: E501
16550+
Delete the relation between a space and a zone. The IFC file will not be updated. The remaining spaces are available in API and will be available when exporting an IFC file Required scopes: ifc:write, model:write # noqa: E501
1637516551
This method makes a synchronous HTTP request by default. To make an
1637616552
asynchronous HTTP request, please pass async_req=True
1637716553

0 commit comments

Comments
 (0)