Skip to content

Commit 8fab6fc

Browse files
committed
MINOR: Add IFC warnings
1 parent fad894f commit 8fab6fc

6 files changed

Lines changed: 79 additions & 13 deletions

File tree

bimdata_api_client/api/project_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ def create_document_with_http_info(self, cloud_pk, project_pk, name, **kwargs):
393393
if ('file_name' in local_var_params and
394394
len(local_var_params['file_name']) > 512):
395395
raise ApiValueError("Invalid value for parameter `file_name` when calling `create_document`, length must be less than or equal to `512`") # noqa: E501
396+
if ('file_name' in local_var_params and
397+
len(local_var_params['file_name']) < 1):
398+
raise ApiValueError("Invalid value for parameter `file_name` when calling `create_document`, length must be greater than or equal to `1`") # noqa: E501
396399
if 'size' in local_var_params and local_var_params['size'] > 2147483647: # noqa: E501
397400
raise ApiValueError("Invalid value for parameter `size` when calling `create_document`, must be a value less than or equal to `2147483647`") # noqa: E501
398401
if 'size' in local_var_params and local_var_params['size'] < 0: # noqa: E501
@@ -1548,6 +1551,9 @@ def full_update_document_with_http_info(self, cloud_pk, id, project_pk, name, **
15481551
if ('file_name' in local_var_params and
15491552
len(local_var_params['file_name']) > 512):
15501553
raise ApiValueError("Invalid value for parameter `file_name` when calling `full_update_document`, length must be less than or equal to `512`") # noqa: E501
1554+
if ('file_name' in local_var_params and
1555+
len(local_var_params['file_name']) < 1):
1556+
raise ApiValueError("Invalid value for parameter `file_name` when calling `full_update_document`, length must be greater than or equal to `1`") # noqa: E501
15511557
if 'size' in local_var_params and local_var_params['size'] > 2147483647: # noqa: E501
15521558
raise ApiValueError("Invalid value for parameter `size` when calling `full_update_document`, must be a value less than or equal to `2147483647`") # noqa: E501
15531559
if 'size' in local_var_params and local_var_params['size'] < 0: # noqa: E501

bimdata_api_client/models/document.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ def __init__(self, id=None, parent=None, parent_id=None, creator=None, project=N
8888
self.creator = creator
8989
self.project = project
9090
self.name = name
91-
self.file_name = file_name
91+
if file_name is not None:
92+
self.file_name = file_name
9293
self.description = description
9394
self.file = file
9495
self.size = size
@@ -255,6 +256,8 @@ def file_name(self, file_name):
255256
"""
256257
if file_name is not None and len(file_name) > 512:
257258
raise ValueError("Invalid value for `file_name`, length must be less than or equal to `512`") # noqa: E501
259+
if file_name is not None and len(file_name) < 1:
260+
raise ValueError("Invalid value for `file_name`, length must be greater than or equal to `1`") # noqa: E501
258261

259262
self._file_name = file_name
260263

bimdata_api_client/models/ifc.py

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class Ifc(object):
4949
'xkt_file': 'str',
5050
'project_id': 'str',
5151
'world_position': 'list[float]',
52-
'errors': 'list[str]'
52+
'errors': 'list[str]',
53+
'warnings': 'list[str]'
5354
}
5455

5556
attribute_map = {
@@ -70,10 +71,11 @@ class Ifc(object):
7071
'xkt_file': 'xkt_file',
7172
'project_id': 'project_id',
7273
'world_position': 'world_position',
73-
'errors': 'errors'
74+
'errors': 'errors',
75+
'warnings': 'warnings'
7476
}
7577

76-
def __init__(self, id=None, name=None, creator=None, status=None, created_at=None, updated_at=None, document_id=None, document=None, structure_file=None, systems_file=None, map_file=None, gltf_file=None, bvh_tree_file=None, viewer_360_file=None, xkt_file=None, project_id=None, world_position=None, errors=None): # noqa: E501
78+
def __init__(self, id=None, name=None, creator=None, status=None, created_at=None, updated_at=None, document_id=None, document=None, structure_file=None, systems_file=None, map_file=None, gltf_file=None, bvh_tree_file=None, viewer_360_file=None, xkt_file=None, project_id=None, world_position=None, errors=None, warnings=None): # noqa: E501
7779
"""Ifc - a model defined in OpenAPI""" # noqa: E501
7880

7981
self._id = None
@@ -94,6 +96,7 @@ def __init__(self, id=None, name=None, creator=None, status=None, created_at=Non
9496
self._project_id = None
9597
self._world_position = None
9698
self._errors = None
99+
self._warnings = None
97100
self.discriminator = None
98101

99102
if id is not None:
@@ -131,6 +134,8 @@ def __init__(self, id=None, name=None, creator=None, status=None, created_at=Non
131134
self.world_position = world_position
132135
if errors is not None:
133136
self.errors = errors
137+
if warnings is not None:
138+
self.warnings = warnings
134139

135140
@property
136141
def id(self):
@@ -495,7 +500,7 @@ def world_position(self, world_position):
495500
def errors(self):
496501
"""Gets the errors of this Ifc. # noqa: E501
497502
498-
List for warnings and errors that happened during IFC processing # noqa: E501
503+
List of errors that happened during IFC processing # noqa: E501
499504
500505
:return: The errors of this Ifc. # noqa: E501
501506
:rtype: list[str]
@@ -506,14 +511,37 @@ def errors(self):
506511
def errors(self, errors):
507512
"""Sets the errors of this Ifc.
508513
509-
List for warnings and errors that happened during IFC processing # noqa: E501
514+
List of errors that happened during IFC processing # noqa: E501
510515
511516
:param errors: The errors of this Ifc. # noqa: E501
512517
:type: list[str]
513518
"""
514519

515520
self._errors = errors
516521

522+
@property
523+
def warnings(self):
524+
"""Gets the warnings of this Ifc. # noqa: E501
525+
526+
List of warnings that happened during IFC processing # noqa: E501
527+
528+
:return: The warnings of this Ifc. # noqa: E501
529+
:rtype: list[str]
530+
"""
531+
return self._warnings
532+
533+
@warnings.setter
534+
def warnings(self, warnings):
535+
"""Sets the warnings of this Ifc.
536+
537+
List of warnings that happened during IFC processing # noqa: E501
538+
539+
:param warnings: The warnings of this Ifc. # noqa: E501
540+
:type: list[str]
541+
"""
542+
543+
self._warnings = warnings
544+
517545
def to_dict(self):
518546
"""Returns the model properties as a dict"""
519547
result = {}

bimdata_api_client/models/ifc_errors.py

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,30 @@ class IfcErrors(object):
3232
and the value is json key in definition.
3333
"""
3434
openapi_types = {
35-
'errors': 'list[str]'
35+
'errors': 'list[str]',
36+
'warnings': 'list[str]'
3637
}
3738

3839
attribute_map = {
39-
'errors': 'errors'
40+
'errors': 'errors',
41+
'warnings': 'warnings'
4042
}
4143

42-
def __init__(self, errors=None): # noqa: E501
44+
def __init__(self, errors=None, warnings=None): # noqa: E501
4345
"""IfcErrors - a model defined in OpenAPI""" # noqa: E501
4446

4547
self._errors = None
48+
self._warnings = None
4649
self.discriminator = None
4750

4851
self.errors = errors
52+
self.warnings = warnings
4953

5054
@property
5155
def errors(self):
5256
"""Gets the errors of this IfcErrors. # noqa: E501
5357
54-
List for warnings and errors that happened during IFC processing # noqa: E501
58+
List of errors that happened during IFC processing # noqa: E501
5559
5660
:return: The errors of this IfcErrors. # noqa: E501
5761
:rtype: list[str]
@@ -62,14 +66,37 @@ def errors(self):
6266
def errors(self, errors):
6367
"""Sets the errors of this IfcErrors.
6468
65-
List for warnings and errors that happened during IFC processing # noqa: E501
69+
List of errors that happened during IFC processing # noqa: E501
6670
6771
:param errors: The errors of this IfcErrors. # noqa: E501
6872
:type: list[str]
6973
"""
7074

7175
self._errors = errors
7276

77+
@property
78+
def warnings(self):
79+
"""Gets the warnings of this IfcErrors. # noqa: E501
80+
81+
List of warnings that happened during IFC processing # noqa: E501
82+
83+
:return: The warnings of this IfcErrors. # noqa: E501
84+
:rtype: list[str]
85+
"""
86+
return self._warnings
87+
88+
@warnings.setter
89+
def warnings(self, warnings):
90+
"""Sets the warnings of this IfcErrors.
91+
92+
List of warnings that happened during IFC processing # noqa: E501
93+
94+
:param warnings: The warnings of this IfcErrors. # noqa: E501
95+
:type: list[str]
96+
"""
97+
98+
self._warnings = warnings
99+
73100
def to_dict(self):
74101
"""Returns the model properties as a dict"""
75102
result = {}

docs/Ifc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Name | Type | Description | Notes
2020
**xkt_file** | **str** | | [optional]
2121
**project_id** | **str** | | [optional]
2222
**world_position** | **list[float]** | [x,y,z] array of the position of the local_placement in world coordinates | [optional]
23-
**errors** | **list[str]** | List for warnings and errors that happened during IFC processing | [optional]
23+
**errors** | **list[str]** | List of errors that happened during IFC processing | [optional]
24+
**warnings** | **list[str]** | List of warnings that happened during IFC processing | [optional]
2425

2526
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2627

docs/IfcErrors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**errors** | **list[str]** | List for warnings and errors that happened during IFC processing | [optional]
6+
**errors** | **list[str]** | List of errors that happened during IFC processing | [optional]
7+
**warnings** | **list[str]** | List of warnings that happened during IFC processing | [optional]
78

89
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
910

0 commit comments

Comments
 (0)