Skip to content

Commit 7c907c8

Browse files
Bimdata-ioAmoki
andcommitted
PATCH: one storey site by building (#469)
* one storey site by building * add db unique constraint * Update ifc/v1/views.py Co-authored-by: Hugo Duroux <hugo@bimdata.io> * Update ifc/v1/views.py Co-authored-by: Hugo Duroux <hugo@bimdata.io> Co-authored-by: Hugo Duroux <hugo@bimdata.io>
1 parent b07ac63 commit 7c907c8

2 files changed

Lines changed: 17 additions & 34 deletions

File tree

bimdata_api_client/api/ifc_api.py

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4438,13 +4438,13 @@ def create_space_with_http_info(self, cloud_pk, ifc_pk, project_pk, data, **kwar
44384438
_request_timeout=local_var_params.get('_request_timeout'),
44394439
collection_formats=collection_formats)
44404440

4441-
def create_storey_plan(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, data, **kwargs): # noqa: E501
4441+
def create_storey_plan(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, **kwargs): # noqa: E501
44424442
"""Create a 2d model in storey # noqa: E501
44434443

4444-
Create a 2d model in storey Required scopes: ifc:write # noqa: E501
4444+
Create a 2d model in storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write # noqa: E501
44454445
This method makes a synchronous HTTP request by default. To make an
44464446
asynchronous HTTP request, please pass async_req=True
4447-
>>> thread = api.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, data, async_req=True)
4447+
>>> thread = api.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, async_req=True)
44484448
>>> result = thread.get()
44494449

44504450
:param async_req bool: execute request asynchronously
@@ -4453,7 +4453,6 @@ def create_storey_plan(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, data,
44534453
:param str ifc_pk: (required)
44544454
:param str project_pk: (required)
44554455
:param str storey_pk: (required)
4456-
:param Storey data: (required)
44574456
:param _preload_content: if False, the urllib3.HTTPResponse object will
44584457
be returned without reading/decoding response
44594458
data. Default is True.
@@ -4466,15 +4465,15 @@ def create_storey_plan(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, data,
44664465
returns the request thread.
44674466
"""
44684467
kwargs['_return_http_data_only'] = True
4469-
return self.create_storey_plan_with_http_info(cloud_pk, id, ifc_pk, project_pk, storey_pk, data, **kwargs) # noqa: E501
4468+
return self.create_storey_plan_with_http_info(cloud_pk, id, ifc_pk, project_pk, storey_pk, **kwargs) # noqa: E501
44704469

4471-
def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, data, **kwargs): # noqa: E501
4470+
def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, storey_pk, **kwargs): # noqa: E501
44724471
"""Create a 2d model in storey # noqa: E501
44734472

4474-
Create a 2d model in storey Required scopes: ifc:write # noqa: E501
4473+
Create a 2d model in storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write # noqa: E501
44754474
This method makes a synchronous HTTP request by default. To make an
44764475
asynchronous HTTP request, please pass async_req=True
4477-
>>> thread = api.create_storey_plan_with_http_info(cloud_pk, id, ifc_pk, project_pk, storey_pk, data, async_req=True)
4476+
>>> thread = api.create_storey_plan_with_http_info(cloud_pk, id, ifc_pk, project_pk, storey_pk, async_req=True)
44784477
>>> result = thread.get()
44794478

44804479
:param async_req bool: execute request asynchronously
@@ -4483,7 +4482,6 @@ def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, st
44834482
:param str ifc_pk: (required)
44844483
:param str project_pk: (required)
44854484
:param str storey_pk: (required)
4486-
:param Storey data: (required)
44874485
:param _return_http_data_only: response data without head status code
44884486
and headers
44894487
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4505,8 +4503,7 @@ def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, st
45054503
'id',
45064504
'ifc_pk',
45074505
'project_pk',
4508-
'storey_pk',
4509-
'data'
4506+
'storey_pk'
45104507
]
45114508
all_params.extend(
45124509
[
@@ -4545,10 +4542,6 @@ def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, st
45454542
if self.api_client.client_side_validation and ('storey_pk' not in local_var_params or # noqa: E501
45464543
local_var_params['storey_pk'] is None): # noqa: E501
45474544
raise ApiValueError("Missing the required parameter `storey_pk` when calling `create_storey_plan`") # noqa: E501
4548-
# verify the required parameter 'data' is set
4549-
if self.api_client.client_side_validation and ('data' not in local_var_params or # noqa: E501
4550-
local_var_params['data'] is None): # noqa: E501
4551-
raise ApiValueError("Missing the required parameter `data` when calling `create_storey_plan`") # noqa: E501
45524545

45534546
collection_formats = {}
45544547

@@ -4572,16 +4565,10 @@ def create_storey_plan_with_http_info(self, cloud_pk, id, ifc_pk, project_pk, st
45724565
local_var_files = {}
45734566

45744567
body_params = None
4575-
if 'data' in local_var_params:
4576-
body_params = local_var_params['data']
45774568
# HTTP header `Accept`
45784569
header_params['Accept'] = self.api_client.select_header_accept(
45794570
['application/json']) # noqa: E501
45804571

4581-
# HTTP header `Content-Type`
4582-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
4583-
['application/json']) # noqa: E501
4584-
45854572
# Authentication setting
45864573
auth_settings = ['Bearer', 'bimdata_connect', 'client_credentials'] # noqa: E501
45874574

@@ -7402,7 +7389,7 @@ def full_update_element_with_http_info(self, cloud_pk, ifc_pk, project_pk, uuid,
74027389
def full_update_storeys(self, cloud_pk, ifc_pk, project_pk, data, **kwargs): # noqa: E501
74037390
"""Update all fields of all storeys # noqa: E501
74047391

7405-
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. An storey with \"is_site=True\" will be stored without order. Required scopes: ifc:write # noqa: E501
7392+
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. A storey with \"is_site=True\" will be stored without order. There can be only one storey with \"is_site=True\"\" Required scopes: ifc:write # noqa: E501
74067393
This method makes a synchronous HTTP request by default. To make an
74077394
asynchronous HTTP request, please pass async_req=True
74087395
>>> thread = api.full_update_storeys(cloud_pk, ifc_pk, project_pk, data, async_req=True)
@@ -7430,7 +7417,7 @@ def full_update_storeys(self, cloud_pk, ifc_pk, project_pk, data, **kwargs): #
74307417
def full_update_storeys_with_http_info(self, cloud_pk, ifc_pk, project_pk, data, **kwargs): # noqa: E501
74317418
"""Update all fields of all storeys # noqa: E501
74327419

7433-
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. An storey with \"is_site=True\" will be stored without order. Required scopes: ifc:write # noqa: E501
7420+
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. A storey with \"is_site=True\" will be stored without order. There can be only one storey with \"is_site=True\"\" Required scopes: ifc:write # noqa: E501
74347421
This method makes a synchronous HTTP request by default. To make an
74357422
asynchronous HTTP request, please pass async_req=True
74367423
>>> thread = api.full_update_storeys_with_http_info(cloud_pk, ifc_pk, project_pk, data, async_req=True)

docs/IfcApi.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6568,11 +6568,11 @@ Name | Type | Description | Notes
65686568
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
65696569

65706570
# **create_storey_plan**
6571-
> Storey create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, data)
6571+
> Storey create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk)
65726572

65736573
Create a 2d model in storey
65746574

6575-
Create a 2d model in storey Required scopes: ifc:write
6575+
Create a 2d model in storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write
65766576

65776577
### Example
65786578

@@ -6625,11 +6625,10 @@ id = 56 # int | A unique integer value identifying this storey.
66256625
ifc_pk = 'ifc_pk_example' # str |
66266626
project_pk = 'project_pk_example' # str |
66276627
storey_pk = 'storey_pk_example' # str |
6628-
data = bimdata_api_client.Storey() # Storey |
66296628

66306629
try:
66316630
# Create a 2d model in storey
6632-
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, data)
6631+
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk)
66336632
pprint(api_response)
66346633
except ApiException as e:
66356634
print("Exception when calling IfcApi->create_storey_plan: %s\n" % e)
@@ -6684,11 +6683,10 @@ id = 56 # int | A unique integer value identifying this storey.
66846683
ifc_pk = 'ifc_pk_example' # str |
66856684
project_pk = 'project_pk_example' # str |
66866685
storey_pk = 'storey_pk_example' # str |
6687-
data = bimdata_api_client.Storey() # Storey |
66886686

66896687
try:
66906688
# Create a 2d model in storey
6691-
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, data)
6689+
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk)
66926690
pprint(api_response)
66936691
except ApiException as e:
66946692
print("Exception when calling IfcApi->create_storey_plan: %s\n" % e)
@@ -6743,11 +6741,10 @@ id = 56 # int | A unique integer value identifying this storey.
67436741
ifc_pk = 'ifc_pk_example' # str |
67446742
project_pk = 'project_pk_example' # str |
67456743
storey_pk = 'storey_pk_example' # str |
6746-
data = bimdata_api_client.Storey() # Storey |
67476744

67486745
try:
67496746
# Create a 2d model in storey
6750-
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk, data)
6747+
api_response = api_instance.create_storey_plan(cloud_pk, id, ifc_pk, project_pk, storey_pk)
67516748
pprint(api_response)
67526749
except ApiException as e:
67536750
print("Exception when calling IfcApi->create_storey_plan: %s\n" % e)
@@ -6762,7 +6759,6 @@ Name | Type | Description | Notes
67626759
**ifc_pk** | **str**| |
67636760
**project_pk** | **str**| |
67646761
**storey_pk** | **str**| |
6765-
**data** | [**Storey**](Storey.md)| |
67666762

67676763
### Return type
67686764

@@ -6774,7 +6770,7 @@ Name | Type | Description | Notes
67746770

67756771
### HTTP request headers
67766772

6777-
- **Content-Type**: application/json
6773+
- **Content-Type**: Not defined
67786774
- **Accept**: application/json
67796775

67806776
### HTTP response details
@@ -11037,7 +11033,7 @@ Name | Type | Description | Notes
1103711033

1103811034
Update all fields of all storeys
1103911035

11040-
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. An storey with \"is_site=True\" will be stored without order. Required scopes: ifc:write
11036+
This route allows you to create storeys, modify them, delete them and organize them by order. If the optional field \"id\" is present, the storey will be modified. Otherwise, a new storey will be created. If an \"id\" present in the api is not present in the list passed in parameter, the corresponding storey will be deleted. A storey with \"is_site=True\" will be stored without order. There can be only one storey with \"is_site=True\"\" Required scopes: ifc:write
1104111037

1104211038
### Example
1104311039

0 commit comments

Comments
 (0)