Skip to content

Commit 0eaaff0

Browse files
committed
PATCH: Feat/multipage pdf (#596)
* create multipage-pdf * fix create_model tests * fix tests * add explicit comment to signal function * update help_text for parent and children
1 parent 1a84d48 commit 0eaaff0

16 files changed

Lines changed: 910 additions & 3 deletions

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ bimdata_api_client/model/components_parent.py
4444
bimdata_api_client/model/components_parent_request.py
4545
bimdata_api_client/model/create_building_by_name_request.py
4646
bimdata_api_client/model/create_model_request.py
47+
bimdata_api_client/model/create_multi_page_model_request.py
4748
bimdata_api_client/model/detailed_extensions.py
4849
bimdata_api_client/model/direction.py
4950
bimdata_api_client/model/direction_request.py
@@ -295,6 +296,7 @@ docs/ComponentsParent.md
295296
docs/ComponentsParentRequest.md
296297
docs/CreateBuildingByNameRequest.md
297298
docs/CreateModelRequest.md
299+
docs/CreateMultiPageModelRequest.md
298300
docs/DetailedExtensions.md
299301
docs/Direction.md
300302
docs/DirectionRequest.md
@@ -551,6 +553,7 @@ test/test_components_parent.py
551553
test/test_components_parent_request.py
552554
test/test_create_building_by_name_request.py
553555
test/test_create_model_request.py
556+
test/test_create_multi_page_model_request.py
554557
test/test_detailed_extensions.py
555558
test/test_direction.py
556559
test/test_direction_request.py

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ Class | Method | HTTP request | Description
374374
*IfcApi* | [**create_ifc_unit_deprecated**](docs/IfcApi.md#create_ifc_unit_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/unit | Create a Unit on a model
375375
*IfcApi* | [**create_layer_deprecated**](docs/IfcApi.md#create_layer_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/layer | Create a layer in the model
376376
*IfcApi* | [**create_meta_building_deprecated**](docs/IfcApi.md#create_meta_building_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/create-metabuilding | Create an empty 3D Model
377+
*IfcApi* | [**create_multi_page_ifc_deprecated**](docs/IfcApi.md#create_multi_page_ifc_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/create-multipage-model | Create a multi page model
377378
*IfcApi* | [**create_property_set_deprecated**](docs/IfcApi.md#create_property_set_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset | Create one or many PropertySet
378379
*IfcApi* | [**create_property_set_element_relations_deprecated**](docs/IfcApi.md#create_property_set_element_relations_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset-element | Create association between PropertySet and element
379380
*IfcApi* | [**create_raw_elements_deprecated**](docs/IfcApi.md#create_raw_elements_deprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/element/raw | Create elements in an optimized format
@@ -528,6 +529,7 @@ Class | Method | HTTP request | Description
528529
*ModelApi* | [**create_model**](docs/ModelApi.md#create_model) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/create-model | Make a PDF or Image file a Model
529530
*ModelApi* | [**create_model_property_definition**](docs/ModelApi.md#create_model_property_definition) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertydefinition | Create a PropertyDefinition on the model
530531
*ModelApi* | [**create_model_unit**](docs/ModelApi.md#create_model_unit) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/unit | Create a Unit on a model
532+
*ModelApi* | [**create_multi_page_model**](docs/ModelApi.md#create_multi_page_model) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{id}/create-multipage-model | Create a multi page model
531533
*ModelApi* | [**create_property_set**](docs/ModelApi.md#create_property_set) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset | Create one or many PropertySet
532534
*ModelApi* | [**create_property_set_element_relations**](docs/ModelApi.md#create_property_set_element_relations) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset-element | Create association between PropertySet and element
533535
*ModelApi* | [**create_raw_elements**](docs/ModelApi.md#create_raw_elements) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/element/raw | Create elements in an optimized format
@@ -688,6 +690,7 @@ Class | Method | HTTP request | Description
688690
- [ComponentsParentRequest](docs/ComponentsParentRequest.md)
689691
- [CreateBuildingByNameRequest](docs/CreateBuildingByNameRequest.md)
690692
- [CreateModelRequest](docs/CreateModelRequest.md)
693+
- [CreateMultiPageModelRequest](docs/CreateMultiPageModelRequest.md)
691694
- [DetailedExtensions](docs/DetailedExtensions.md)
692695
- [Direction](docs/Direction.md)
693696
- [DirectionRequest](docs/DirectionRequest.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8240,7 +8240,7 @@ def create_document(
82408240
):
82418241
"""Create a document # noqa: E501
82428242

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

bimdata_api_client/api/ifc_api.py

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from bimdata_api_client.model.classification_request import ClassificationRequest
3131
from bimdata_api_client.model.create_building_by_name_request import CreateBuildingByNameRequest
3232
from bimdata_api_client.model.create_model_request import CreateModelRequest
33+
from bimdata_api_client.model.create_multi_page_model_request import CreateMultiPageModelRequest
3334
from bimdata_api_client.model.document import Document
3435
from bimdata_api_client.model.document_with_element_list import DocumentWithElementList
3536
from bimdata_api_client.model.element import Element
@@ -2388,6 +2389,81 @@ def __init__(self, api_client=None):
23882389
},
23892390
api_client=api_client
23902391
)
2392+
self.create_multi_page_ifc_deprecated_endpoint = _Endpoint(
2393+
settings={
2394+
'response_type': (Model,),
2395+
'auth': [
2396+
'ApiKey',
2397+
'BIMData_Connect',
2398+
'BIMData_Connect',
2399+
'Bearer'
2400+
],
2401+
'endpoint_path': '/cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/create-multipage-model',
2402+
'operation_id': 'create_multi_page_ifc_deprecated',
2403+
'http_method': 'POST',
2404+
'servers': None,
2405+
},
2406+
params_map={
2407+
'all': [
2408+
'cloud_pk',
2409+
'id',
2410+
'project_pk',
2411+
'create_multi_page_model_request',
2412+
],
2413+
'required': [
2414+
'cloud_pk',
2415+
'id',
2416+
'project_pk',
2417+
'create_multi_page_model_request',
2418+
],
2419+
'nullable': [
2420+
],
2421+
'enum': [
2422+
],
2423+
'validation': [
2424+
]
2425+
},
2426+
root_map={
2427+
'validations': {
2428+
},
2429+
'allowed_values': {
2430+
},
2431+
'openapi_types': {
2432+
'cloud_pk':
2433+
(int,),
2434+
'id':
2435+
(int,),
2436+
'project_pk':
2437+
(int,),
2438+
'create_multi_page_model_request':
2439+
(CreateMultiPageModelRequest,),
2440+
},
2441+
'attribute_map': {
2442+
'cloud_pk': 'cloud_pk',
2443+
'id': 'id',
2444+
'project_pk': 'project_pk',
2445+
},
2446+
'location_map': {
2447+
'cloud_pk': 'path',
2448+
'id': 'path',
2449+
'project_pk': 'path',
2450+
'create_multi_page_model_request': 'body',
2451+
},
2452+
'collection_format_map': {
2453+
}
2454+
},
2455+
headers_map={
2456+
'accept': [
2457+
'application/json'
2458+
],
2459+
'content_type': [
2460+
'application/json',
2461+
'application/x-www-form-urlencoded',
2462+
'multipart/form-data'
2463+
]
2464+
},
2465+
api_client=api_client
2466+
)
23912467
self.create_property_set_deprecated_endpoint = _Endpoint(
23922468
settings={
23932469
'response_type': ([PropertySet],),
@@ -14591,6 +14667,96 @@ def create_meta_building_deprecated(
1459114667
create_building_by_name_request
1459214668
return self.create_meta_building_deprecated_endpoint.call_with_http_info(**kwargs)
1459314669

14670+
def create_multi_page_ifc_deprecated(
14671+
self,
14672+
cloud_pk,
14673+
id,
14674+
project_pk,
14675+
create_multi_page_model_request,
14676+
**kwargs
14677+
):
14678+
"""Create a multi page model # noqa: E501
14679+
14680+
Create a multi page model Required scopes: ifc:write, model:write # noqa: E501
14681+
This method makes a synchronous HTTP request by default. To make an
14682+
asynchronous HTTP request, please pass async_req=True
14683+
14684+
>>> thread = api.create_multi_page_ifc_deprecated(cloud_pk, id, project_pk, create_multi_page_model_request, async_req=True)
14685+
>>> result = thread.get()
14686+
14687+
Args:
14688+
cloud_pk (int):
14689+
id (int): A unique integer value identifying this model.
14690+
project_pk (int):
14691+
create_multi_page_model_request (CreateMultiPageModelRequest):
14692+
14693+
Keyword Args:
14694+
_return_http_data_only (bool): response data without head status
14695+
code and headers. Default is True.
14696+
_preload_content (bool): if False, the urllib3.HTTPResponse object
14697+
will be returned without reading/decoding response data.
14698+
Default is True.
14699+
_request_timeout (int/float/tuple): timeout setting for this request. If
14700+
one number provided, it will be total request timeout. It can also
14701+
be a pair (tuple) of (connection, read) timeouts.
14702+
Default is None.
14703+
_check_input_type (bool): specifies if type checking
14704+
should be done one the data sent to the server.
14705+
Default is True.
14706+
_check_return_type (bool): specifies if type checking
14707+
should be done one the data received from the server.
14708+
Default is True.
14709+
_spec_property_naming (bool): True if the variable names in the input data
14710+
are serialized names, as specified in the OpenAPI document.
14711+
False if the variable names in the input data
14712+
are pythonic names, e.g. snake case (default)
14713+
_content_type (str/None): force body content-type.
14714+
Default is None and content-type will be predicted by allowed
14715+
content-types and body.
14716+
_host_index (int/None): specifies the index of the server
14717+
that we want to use.
14718+
Default is read from the configuration.
14719+
async_req (bool): execute request asynchronously
14720+
14721+
Returns:
14722+
Model
14723+
If the method is called asynchronously, returns the request
14724+
thread.
14725+
"""
14726+
kwargs['async_req'] = kwargs.get(
14727+
'async_req', False
14728+
)
14729+
kwargs['_return_http_data_only'] = kwargs.get(
14730+
'_return_http_data_only', True
14731+
)
14732+
kwargs['_preload_content'] = kwargs.get(
14733+
'_preload_content', True
14734+
)
14735+
kwargs['_request_timeout'] = kwargs.get(
14736+
'_request_timeout', None
14737+
)
14738+
kwargs['_check_input_type'] = kwargs.get(
14739+
'_check_input_type', True
14740+
)
14741+
kwargs['_check_return_type'] = kwargs.get(
14742+
'_check_return_type', True
14743+
)
14744+
kwargs['_spec_property_naming'] = kwargs.get(
14745+
'_spec_property_naming', False
14746+
)
14747+
kwargs['_content_type'] = kwargs.get(
14748+
'_content_type')
14749+
kwargs['_host_index'] = kwargs.get('_host_index')
14750+
kwargs['cloud_pk'] = \
14751+
cloud_pk
14752+
kwargs['id'] = \
14753+
id
14754+
kwargs['project_pk'] = \
14755+
project_pk
14756+
kwargs['create_multi_page_model_request'] = \
14757+
create_multi_page_model_request
14758+
return self.create_multi_page_ifc_deprecated_endpoint.call_with_http_info(**kwargs)
14759+
1459414760
def create_property_set_deprecated(
1459514761
self,
1459614762
cloud_pk,

0 commit comments

Comments
 (0)