Skip to content

Commit f00e1ba

Browse files
committed
PATCH: fix model.document parent_id
1 parent 2e89884 commit f00e1ba

File tree

10 files changed

+57
-47
lines changed

10 files changed

+57
-47
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8815,7 +8815,7 @@ def create_document(
88158815
):
88168816
"""Create a document # noqa: E501
88178817

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

bimdata_api_client/model/model_document.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def openapi_types():
105105
'user_permission': (int,), # noqa: E501
106106
'office_preview': (str, none_type,), # noqa: E501
107107
'file_name': (str,), # noqa: E501
108+
'parent_id': (int, none_type,), # noqa: E501
108109
'description': (str, none_type,), # noqa: E501
109110
}
110111

@@ -126,6 +127,7 @@ def discriminator():
126127
'user_permission': 'user_permission', # noqa: E501
127128
'office_preview': 'office_preview', # noqa: E501
128129
'file_name': 'file_name', # noqa: E501
130+
'parent_id': 'parent_id', # noqa: E501
129131
'description': 'description', # noqa: E501
130132
}
131133

@@ -193,6 +195,7 @@ def _from_openapi_data(cls, id, name, file, size, created_at, updated_at, head_i
193195
through its discriminator because we passed in
194196
_visited_composed_classes = (Animal,)
195197
file_name (str): Full name of the file. [optional] # noqa: E501
198+
parent_id (int, none_type): [optional] # noqa: E501
196199
description (str, none_type): Description of the file. [optional] # noqa: E501
197200
"""
198201

@@ -289,6 +292,7 @@ def __init__(self, name, file, *args, **kwargs): # noqa: E501
289292
through its discriminator because we passed in
290293
_visited_composed_classes = (Animal,)
291294
file_name (str): Full name of the file. [optional] # noqa: E501
295+
parent_id (int, none_type): [optional] # noqa: E501
292296
description (str, none_type): Description of the file. [optional] # noqa: E501
293297
"""
294298

bimdata_api_client/model/model_document_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def openapi_types():
9696
'name': (str,), # noqa: E501
9797
'file': (file_type,), # noqa: E501
9898
'file_name': (str,), # noqa: E501
99+
'parent_id': (int, none_type,), # noqa: E501
99100
'description': (str, none_type,), # noqa: E501
100101
'process_hint': (str,), # noqa: E501
101102
}
@@ -109,6 +110,7 @@ def discriminator():
109110
'name': 'name', # noqa: E501
110111
'file': 'file', # noqa: E501
111112
'file_name': 'file_name', # noqa: E501
113+
'parent_id': 'parent_id', # noqa: E501
112114
'description': 'description', # noqa: E501
113115
'process_hint': 'process_hint', # noqa: E501
114116
}
@@ -159,6 +161,7 @@ def _from_openapi_data(cls, name, file, *args, **kwargs): # noqa: E501
159161
through its discriminator because we passed in
160162
_visited_composed_classes = (Animal,)
161163
file_name (str): Full name of the file. [optional] # noqa: E501
164+
parent_id (int, none_type): [optional] # noqa: E501
162165
description (str, none_type): Description of the file. [optional] # noqa: E501
163166
process_hint (str): Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE. [optional] if omitted the server will use the default value of "PHOTOSPHERE" # noqa: E501
164167
"""
@@ -249,6 +252,7 @@ def __init__(self, name, file, *args, **kwargs): # noqa: E501
249252
through its discriminator because we passed in
250253
_visited_composed_classes = (Animal,)
251254
file_name (str): Full name of the file. [optional] # noqa: E501
255+
parent_id (int, none_type): [optional] # noqa: E501
252256
description (str, none_type): Description of the file. [optional] # noqa: E501
253257
process_hint (str): Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE. [optional] if omitted the server will use the default value of "PHOTOSPHERE" # noqa: E501
254258
"""

bimdata_api_client/model/write_folder.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ def openapi_types():
107107
"""
108108
lazy_import()
109109
return {
110-
'user_permission': (int,), # noqa: E501
111-
'id': (int,), # noqa: E501
112110
'updated_at': (datetime,), # noqa: E501
113-
'created_at': (datetime,), # noqa: E501
114-
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
115111
'groups_permissions': ([GroupFolderRead],), # noqa: E501
112+
'user_permission': (int,), # noqa: E501
116113
'name': (str,), # noqa: E501
117-
'type': (str,), # noqa: E501
118114
'nature': (str,), # noqa: E501
119-
'parent_id': (int, none_type,), # noqa: E501
115+
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
116+
'created_at': (datetime,), # noqa: E501
117+
'id': (int,), # noqa: E501
118+
'type': (str,), # noqa: E501
120119
'default_permission': (int,), # noqa: E501
120+
'parent_id': (int, none_type,), # noqa: E501
121121
'children': ([WriteFolder], none_type,), # noqa: E501
122122
}
123123

@@ -127,48 +127,48 @@ def discriminator():
127127

128128

129129
attribute_map = {
130-
'user_permission': 'user_permission', # noqa: E501
131-
'id': 'id', # noqa: E501
132130
'updated_at': 'updated_at', # noqa: E501
133-
'created_at': 'created_at', # noqa: E501
134-
'created_by': 'created_by', # noqa: E501
135131
'groups_permissions': 'groups_permissions', # noqa: E501
132+
'user_permission': 'user_permission', # noqa: E501
136133
'name': 'name', # noqa: E501
137-
'type': 'type', # noqa: E501
138134
'nature': 'nature', # noqa: E501
139-
'parent_id': 'parent_id', # noqa: E501
135+
'created_by': 'created_by', # noqa: E501
136+
'created_at': 'created_at', # noqa: E501
137+
'id': 'id', # noqa: E501
138+
'type': 'type', # noqa: E501
140139
'default_permission': 'default_permission', # noqa: E501
140+
'parent_id': 'parent_id', # noqa: E501
141141
'children': 'children', # noqa: E501
142142
}
143143

144144
read_only_vars = {
145-
'user_permission', # noqa: E501
146-
'id', # noqa: E501
147145
'updated_at', # noqa: E501
148-
'created_at', # noqa: E501
149-
'created_by', # noqa: E501
150146
'groups_permissions', # noqa: E501
151-
'type', # noqa: E501
147+
'user_permission', # noqa: E501
152148
'nature', # noqa: E501
149+
'created_by', # noqa: E501
150+
'created_at', # noqa: E501
151+
'id', # noqa: E501
152+
'type', # noqa: E501
153153
}
154154

155155
_composed_schemas = {}
156156

157157
@classmethod
158158
@convert_js_args_to_python_args
159-
def _from_openapi_data(cls, user_permission, id, updated_at, created_at, created_by, groups_permissions, name, type, nature, *args, **kwargs): # noqa: E501
159+
def _from_openapi_data(cls, updated_at, groups_permissions, user_permission, name, nature, created_by, created_at, id, type, *args, **kwargs): # noqa: E501
160160
"""WriteFolder - a model defined in OpenAPI
161161
162162
Args:
163-
user_permission (int): Aggregate of group user permissions and folder default permission
164-
id (int):
165163
updated_at (datetime): Date of the last update
166-
created_at (datetime): Creation date
167-
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
168164
groups_permissions ([GroupFolderRead]): List of group permissions
165+
user_permission (int): Aggregate of group user permissions and folder default permission
169166
name (str): Name of the folder
170-
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
171167
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
168+
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
169+
created_at (datetime): Creation date
170+
id (int):
171+
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
172172
173173
Keyword Args:
174174
_check_type (bool): if True, values for parameters in openapi_types
@@ -201,8 +201,8 @@ def _from_openapi_data(cls, user_permission, id, updated_at, created_at, created
201201
Animal class but this time we won't travel
202202
through its discriminator because we passed in
203203
_visited_composed_classes = (Animal,)
204-
parent_id (int, none_type): [optional] # noqa: E501
205204
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
205+
parent_id (int, none_type): [optional] # noqa: E501
206206
children ([WriteFolder], none_type): [optional] # noqa: E501
207207
"""
208208

@@ -231,15 +231,15 @@ def _from_openapi_data(cls, user_permission, id, updated_at, created_at, created
231231
self._configuration = _configuration
232232
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
233233

234-
self.user_permission = user_permission
235-
self.id = id
236234
self.updated_at = updated_at
237-
self.created_at = created_at
238-
self.created_by = created_by
239235
self.groups_permissions = groups_permissions
236+
self.user_permission = user_permission
240237
self.name = name
241-
self.type = type
242238
self.nature = nature
239+
self.created_by = created_by
240+
self.created_at = created_at
241+
self.id = id
242+
self.type = type
243243
for var_name, var_value in kwargs.items():
244244
if var_name not in self.attribute_map and \
245245
self._configuration is not None and \
@@ -295,8 +295,8 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
295295
Animal class but this time we won't travel
296296
through its discriminator because we passed in
297297
_visited_composed_classes = (Animal,)
298-
parent_id (int, none_type): [optional] # noqa: E501
299298
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
299+
parent_id (int, none_type): [optional] # noqa: E501
300300
children ([WriteFolder], none_type): [optional] # noqa: E501
301301
"""
302302

bimdata_api_client/model/write_folder_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def openapi_types():
102102
lazy_import()
103103
return {
104104
'name': (str,), # noqa: E501
105-
'parent_id': (int, none_type,), # noqa: E501
106105
'default_permission': (int,), # noqa: E501
106+
'parent_id': (int, none_type,), # noqa: E501
107107
'children': ([WriteFolder], none_type,), # noqa: E501
108108
}
109109

@@ -114,8 +114,8 @@ def discriminator():
114114

115115
attribute_map = {
116116
'name': 'name', # noqa: E501
117-
'parent_id': 'parent_id', # noqa: E501
118117
'default_permission': 'default_permission', # noqa: E501
118+
'parent_id': 'parent_id', # noqa: E501
119119
'children': 'children', # noqa: E501
120120
}
121121

@@ -163,8 +163,8 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
163163
Animal class but this time we won't travel
164164
through its discriminator because we passed in
165165
_visited_composed_classes = (Animal,)
166-
parent_id (int, none_type): [optional] # noqa: E501
167166
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
167+
parent_id (int, none_type): [optional] # noqa: E501
168168
children ([WriteFolder], none_type): [optional] # noqa: E501
169169
"""
170170

@@ -251,8 +251,8 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
251251
Animal class but this time we won't travel
252252
through its discriminator because we passed in
253253
_visited_composed_classes = (Animal,)
254-
parent_id (int, none_type): [optional] # noqa: E501
255254
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
255+
parent_id (int, none_type): [optional] # noqa: E501
256256
children ([WriteFolder], none_type): [optional] # noqa: E501
257257
"""
258258

docs/CollaborationApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,14 +1481,14 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
14811481
id = 1 # int | A unique integer value identifying this project.
14821482
write_folder_request = [
14831483
WriteFolderRequest(
1484-
parent_id=1,
1485-
default_permission=1,
14861484
name="name_example",
1485+
default_permission=1,
1486+
parent_id=1,
14871487
children=[
14881488
WriteFolder(
1489-
parent_id=1,
1490-
default_permission=1,
14911489
name="name_example",
1490+
default_permission=1,
1491+
parent_id=1,
14921492
children=None,
14931493
),
14941494
],
@@ -1545,7 +1545,7 @@ Name | Type | Description | Notes
15451545
15461546
Create a document
15471547

1548-
Create a document. If the document is one of {'GLTF', 'OBJ', 'DWG', 'DXF', 'IFC', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
1548+
Create a document. If the document is one of {'DWG', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
15491549

15501550
### Example
15511551

docs/ModelDocument.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
1616
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
1717
**office_preview** | **str, none_type** | Office files will be converted as pdf to provide a web preview. Supported extensions are .ppt, .pptx, .odp, .xls, .xlsx, .ods, .doc, .docx, .odt | [readonly]
1818
**file_name** | **str** | Full name of the file | [optional]
19+
**parent_id** | **int, none_type** | | [optional]
1920
**description** | **str, none_type** | Description of the file | [optional]
2021
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
2122

docs/ModelDocumentRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**name** | **str** | Shown name of the file |
88
**file** | **file_type** | |
99
**file_name** | **str** | Full name of the file | [optional]
10+
**parent_id** | **int, none_type** | | [optional]
1011
**description** | **str, none_type** | Description of the file | [optional]
1112
**process_hint** | **str** | Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE | [optional] if omitted the server will use the default value of "PHOTOSPHERE"
1213
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

docs/WriteFolder.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
8-
**id** | **int** | | [readonly]
97
**updated_at** | **datetime** | Date of the last update | [readonly]
10-
**created_at** | **datetime** | Creation date | [readonly]
11-
**created_by** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
128
**groups_permissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
9+
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
1310
**name** | **str** | Name of the folder |
14-
**type** | **str** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
1511
**nature** | **str** | Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
16-
**parent_id** | **int, none_type** | | [optional]
12+
**created_by** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
13+
**created_at** | **datetime** | Creation date | [readonly]
14+
**id** | **int** | | [readonly]
15+
**type** | **str** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
1716
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
17+
**parent_id** | **int, none_type** | | [optional]
1818
**children** | [**[WriteFolder], none_type**](WriteFolder.md) | | [optional]
1919
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
2020

docs/WriteFolderRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **str** | Name of the folder |
8-
**parent_id** | **int, none_type** | | [optional]
98
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
9+
**parent_id** | **int, none_type** | | [optional]
1010
**children** | [**[WriteFolder], none_type**](WriteFolder.md) | | [optional]
1111
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1212

0 commit comments

Comments
 (0)