Skip to content

Commit bac378e

Browse files
committed
PATCH: Allow crop_path to be null on Mask2D. (#867)
1 parent 8de0cf6 commit bac378e

File tree

12 files changed

+64
-67
lines changed

12 files changed

+64
-67
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8599,7 +8599,7 @@ def create_document(
85998599
):
86008600
"""Create a document # noqa: E501
86018601

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

bimdata_api_client/api/model_api.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,6 @@ def __init__(self, api_client=None):
21492149
'cloud_pk',
21502150
'id',
21512151
'project_pk',
2152-
'mask2_d_request',
21532152
],
21542153
'nullable': [
21552154
],
@@ -14266,7 +14265,6 @@ def create_mask2_d(
1426614265
cloud_pk,
1426714266
id,
1426814267
project_pk,
14269-
mask2_d_request,
1427014268
**kwargs
1427114269
):
1427214270
"""Create or update a 2D mask for the model # noqa: E501
@@ -14275,16 +14273,16 @@ def create_mask2_d(
1427514273
This method makes a synchronous HTTP request by default. To make an
1427614274
asynchronous HTTP request, please pass async_req=True
1427714275

14278-
>>> thread = api.create_mask2_d(cloud_pk, id, project_pk, mask2_d_request, async_req=True)
14276+
>>> thread = api.create_mask2_d(cloud_pk, id, project_pk, async_req=True)
1427914277
>>> result = thread.get()
1428014278

1428114279
Args:
1428214280
cloud_pk (int):
1428314281
id (int): A unique integer value identifying this model.
1428414282
project_pk (int):
14285-
mask2_d_request (Mask2DRequest):
1428614283

1428714284
Keyword Args:
14285+
mask2_d_request (Mask2DRequest): [optional]
1428814286
_return_http_data_only (bool): response data without head status
1428914287
code and headers. Default is True.
1429014288
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -14347,8 +14345,6 @@ def create_mask2_d(
1434714345
id
1434814346
kwargs['project_pk'] = \
1434914347
project_pk
14350-
kwargs['mask2_d_request'] = \
14351-
mask2_d_request
1435214348
return self.create_mask2_d_endpoint.call_with_http_info(**kwargs)
1435314349

1435414350
def create_meta_building(

bimdata_api_client/model/mask2_d.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ def openapi_types():
8787
"""
8888
return {
8989
'id': (int,), # noqa: E501
90-
'crop_path': ([[float]],), # noqa: E501
9190
'created_at': (datetime,), # noqa: E501
9291
'updated_at': (datetime,), # noqa: E501
92+
'crop_path': ([[float]], none_type,), # noqa: E501
9393
'grayscale': (bool,), # noqa: E501
9494
'opacity': (float, none_type,), # noqa: E501
9595
'brightness': (float, none_type,), # noqa: E501
@@ -103,9 +103,9 @@ def discriminator():
103103

104104
attribute_map = {
105105
'id': 'id', # noqa: E501
106-
'crop_path': 'crop_path', # noqa: E501
107106
'created_at': 'created_at', # noqa: E501
108107
'updated_at': 'updated_at', # noqa: E501
108+
'crop_path': 'crop_path', # noqa: E501
109109
'grayscale': 'grayscale', # noqa: E501
110110
'opacity': 'opacity', # noqa: E501
111111
'brightness': 'brightness', # noqa: E501
@@ -122,12 +122,11 @@ def discriminator():
122122

123123
@classmethod
124124
@convert_js_args_to_python_args
125-
def _from_openapi_data(cls, id, crop_path, created_at, updated_at, *args, **kwargs): # noqa: E501
125+
def _from_openapi_data(cls, id, created_at, updated_at, *args, **kwargs): # noqa: E501
126126
"""Mask2D - a model defined in OpenAPI
127127
128128
Args:
129129
id (int):
130-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.
131130
created_at (datetime): Creation date
132131
updated_at (datetime): Date of the last update
133132
@@ -162,6 +161,7 @@ def _from_openapi_data(cls, id, crop_path, created_at, updated_at, *args, **kwar
162161
Animal class but this time we won't travel
163162
through its discriminator because we passed in
164163
_visited_composed_classes = (Animal,)
164+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
165165
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
166166
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
167167
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501
@@ -194,7 +194,6 @@ def _from_openapi_data(cls, id, crop_path, created_at, updated_at, *args, **kwar
194194
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
195195

196196
self.id = id
197-
self.crop_path = crop_path
198197
self.created_at = created_at
199198
self.updated_at = updated_at
200199
for var_name, var_value in kwargs.items():
@@ -217,10 +216,9 @@ def _from_openapi_data(cls, id, crop_path, created_at, updated_at, *args, **kwar
217216
])
218217

219218
@convert_js_args_to_python_args
220-
def __init__(self, crop_path, *args, **kwargs): # noqa: E501
219+
def __init__(self, *args, **kwargs): # noqa: E501
221220
"""Mask2D - a model defined in OpenAPI
222221
223-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.
224222
Keyword Args:
225223
_check_type (bool): if True, values for parameters in openapi_types
226224
will be type checked and a TypeError will be
@@ -252,6 +250,7 @@ def __init__(self, crop_path, *args, **kwargs): # noqa: E501
252250
Animal class but this time we won't travel
253251
through its discriminator because we passed in
254252
_visited_composed_classes = (Animal,)
253+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
255254
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
256255
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
257256
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501
@@ -281,7 +280,6 @@ def __init__(self, crop_path, *args, **kwargs): # noqa: E501
281280
self._configuration = _configuration
282281
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
283282

284-
self.crop_path = crop_path
285283
for var_name, var_value in kwargs.items():
286284
if var_name not in self.attribute_map and \
287285
self._configuration is not None and \

bimdata_api_client/model/mask2_d_request.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def openapi_types():
8686
and the value is attribute type.
8787
"""
8888
return {
89-
'crop_path': ([[float]],), # noqa: E501
89+
'crop_path': ([[float]], none_type,), # noqa: E501
9090
'grayscale': (bool,), # noqa: E501
9191
'opacity': (float, none_type,), # noqa: E501
9292
'brightness': (float, none_type,), # noqa: E501
@@ -113,12 +113,9 @@ def discriminator():
113113

114114
@classmethod
115115
@convert_js_args_to_python_args
116-
def _from_openapi_data(cls, crop_path, *args, **kwargs): # noqa: E501
116+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
117117
"""Mask2DRequest - a model defined in OpenAPI
118118
119-
Args:
120-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.
121-
122119
Keyword Args:
123120
_check_type (bool): if True, values for parameters in openapi_types
124121
will be type checked and a TypeError will be
@@ -150,6 +147,7 @@ def _from_openapi_data(cls, crop_path, *args, **kwargs): # noqa: E501
150147
Animal class but this time we won't travel
151148
through its discriminator because we passed in
152149
_visited_composed_classes = (Animal,)
150+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
153151
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
154152
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
155153
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501
@@ -181,7 +179,6 @@ def _from_openapi_data(cls, crop_path, *args, **kwargs): # noqa: E501
181179
self._configuration = _configuration
182180
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
183181

184-
self.crop_path = crop_path
185182
for var_name, var_value in kwargs.items():
186183
if var_name not in self.attribute_map and \
187184
self._configuration is not None and \
@@ -202,12 +199,9 @@ def _from_openapi_data(cls, crop_path, *args, **kwargs): # noqa: E501
202199
])
203200

204201
@convert_js_args_to_python_args
205-
def __init__(self, crop_path, *args, **kwargs): # noqa: E501
202+
def __init__(self, *args, **kwargs): # noqa: E501
206203
"""Mask2DRequest - a model defined in OpenAPI
207204
208-
Args:
209-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.
210-
211205
Keyword Args:
212206
_check_type (bool): if True, values for parameters in openapi_types
213207
will be type checked and a TypeError will be
@@ -239,6 +233,7 @@ def __init__(self, crop_path, *args, **kwargs): # noqa: E501
239233
Animal class but this time we won't travel
240234
through its discriminator because we passed in
241235
_visited_composed_classes = (Animal,)
236+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
242237
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
243238
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
244239
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501
@@ -268,7 +263,6 @@ def __init__(self, crop_path, *args, **kwargs): # noqa: E501
268263
self._configuration = _configuration
269264
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
270265

271-
self.crop_path = crop_path
272266
for var_name, var_value in kwargs.items():
273267
if var_name not in self.attribute_map and \
274268
self._configuration is not None and \

bimdata_api_client/model/patched_mask2_d_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def openapi_types():
8686
and the value is attribute type.
8787
"""
8888
return {
89-
'crop_path': ([[float]],), # noqa: E501
89+
'crop_path': ([[float]], none_type,), # noqa: E501
9090
'grayscale': (bool,), # noqa: E501
9191
'opacity': (float, none_type,), # noqa: E501
9292
'brightness': (float, none_type,), # noqa: E501
@@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
147147
Animal class but this time we won't travel
148148
through its discriminator because we passed in
149149
_visited_composed_classes = (Animal,)
150-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
150+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
151151
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
152152
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
153153
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501
@@ -233,7 +233,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
233233
Animal class but this time we won't travel
234234
through its discriminator because we passed in
235235
_visited_composed_classes = (Animal,)
236-
crop_path ([[float]]): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
236+
crop_path ([[float]], none_type): Crop path of the manually created mask to show only a part of the model.. [optional] # noqa: E501
237237
grayscale (bool): Whether the mask is grayscale. [optional] # noqa: E501
238238
opacity (float, none_type): Opacity of the mask (0-1). [optional] # noqa: E501
239239
brightness (float, none_type): Brightness of the mask. [optional] # noqa: E501

bimdata_api_client/model/write_folder.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ def openapi_types():
107107
"""
108108
lazy_import()
109109
return {
110-
'type': (str,), # noqa: E501
111-
'name': (str,), # noqa: E501
110+
'updated_at': (datetime,), # noqa: E501
112111
'id': (int,), # noqa: E501
113-
'groups_permissions': ([GroupFolderRead],), # noqa: E501
112+
'type': (str,), # noqa: E501
114113
'created_at': (datetime,), # noqa: E501
115-
'updated_at': (datetime,), # noqa: E501
114+
'user_permission': (int,), # noqa: E501
116115
'nature': (str,), # noqa: E501
116+
'groups_permissions': ([GroupFolderRead],), # noqa: E501
117+
'name': (str,), # noqa: E501
117118
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
118-
'user_permission': (int,), # noqa: E501
119119
'default_permission': (int,), # noqa: E501
120120
'parent_id': (int, none_type,), # noqa: E501
121121
'children': ([WriteFolder], none_type,), # noqa: E501
@@ -127,48 +127,48 @@ def discriminator():
127127

128128

129129
attribute_map = {
130-
'type': 'type', # noqa: E501
131-
'name': 'name', # noqa: E501
130+
'updated_at': 'updated_at', # noqa: E501
132131
'id': 'id', # noqa: E501
133-
'groups_permissions': 'groups_permissions', # noqa: E501
132+
'type': 'type', # noqa: E501
134133
'created_at': 'created_at', # noqa: E501
135-
'updated_at': 'updated_at', # noqa: E501
134+
'user_permission': 'user_permission', # noqa: E501
136135
'nature': 'nature', # noqa: E501
136+
'groups_permissions': 'groups_permissions', # noqa: E501
137+
'name': 'name', # noqa: E501
137138
'created_by': 'created_by', # noqa: E501
138-
'user_permission': 'user_permission', # noqa: E501
139139
'default_permission': 'default_permission', # noqa: E501
140140
'parent_id': 'parent_id', # noqa: E501
141141
'children': 'children', # noqa: E501
142142
}
143143

144144
read_only_vars = {
145-
'type', # noqa: E501
145+
'updated_at', # noqa: E501
146146
'id', # noqa: E501
147-
'groups_permissions', # noqa: E501
147+
'type', # noqa: E501
148148
'created_at', # noqa: E501
149-
'updated_at', # noqa: E501
149+
'user_permission', # noqa: E501
150150
'nature', # noqa: E501
151+
'groups_permissions', # noqa: E501
151152
'created_by', # noqa: E501
152-
'user_permission', # noqa: E501
153153
}
154154

155155
_composed_schemas = {}
156156

157157
@classmethod
158158
@convert_js_args_to_python_args
159-
def _from_openapi_data(cls, type, name, id, groups_permissions, created_at, updated_at, nature, created_by, user_permission, *args, **kwargs): # noqa: E501
159+
def _from_openapi_data(cls, updated_at, id, type, created_at, user_permission, nature, groups_permissions, name, created_by, *args, **kwargs): # noqa: E501
160160
"""WriteFolder - a model defined in OpenAPI
161161
162162
Args:
163-
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
164-
name (str): Name of the folder
163+
updated_at (datetime): Date of the last update
165164
id (int):
166-
groups_permissions ([GroupFolderRead]): List of group permissions
165+
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
167166
created_at (datetime): Creation date
168-
updated_at (datetime): Date of the last update
167+
user_permission (int): Aggregate of group user permissions and folder default permission
169168
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
169+
groups_permissions ([GroupFolderRead]): List of group permissions
170+
name (str): Name of the folder
170171
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
171-
user_permission (int): Aggregate of group user permissions and folder default permission
172172
173173
Keyword Args:
174174
_check_type (bool): if True, values for parameters in openapi_types
@@ -231,15 +231,15 @@ def _from_openapi_data(cls, type, name, id, groups_permissions, created_at, upda
231231
self._configuration = _configuration
232232
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
233233

234-
self.type = type
235-
self.name = name
234+
self.updated_at = updated_at
236235
self.id = id
237-
self.groups_permissions = groups_permissions
236+
self.type = type
238237
self.created_at = created_at
239-
self.updated_at = updated_at
238+
self.user_permission = user_permission
240239
self.nature = nature
240+
self.groups_permissions = groups_permissions
241+
self.name = name
241242
self.created_by = created_by
242-
self.user_permission = user_permission
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 \

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ Name | Type | Description | Notes
13631363
13641364
Create a document
13651365

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

13681368
### Example
13691369

docs/Mask2D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **int** | | [readonly]
8-
**crop_path** | **[[float]]** | Crop path of the manually created mask to show only a part of the model. |
98
**created_at** | **datetime** | Creation date | [readonly]
109
**updated_at** | **datetime** | Date of the last update | [readonly]
10+
**crop_path** | **[[float]], none_type** | Crop path of the manually created mask to show only a part of the model. | [optional]
1111
**grayscale** | **bool** | Whether the mask is grayscale | [optional]
1212
**opacity** | **float, none_type** | Opacity of the mask (0-1) | [optional]
1313
**brightness** | **float, none_type** | Brightness of the mask | [optional]

docs/Mask2DRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**crop_path** | **[[float]]** | Crop path of the manually created mask to show only a part of the model. |
7+
**crop_path** | **[[float]], none_type** | Crop path of the manually created mask to show only a part of the model. | [optional]
88
**grayscale** | **bool** | Whether the mask is grayscale | [optional]
99
**opacity** | **float, none_type** | Opacity of the mask (0-1) | [optional]
1010
**brightness** | **float, none_type** | Brightness of the mask | [optional]

0 commit comments

Comments
 (0)