|
3 | 3 | """ |
4 | 4 | BIMData API |
5 | 5 |
|
6 | | - BIMData API documentation # noqa: E501 |
| 6 | + BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints. # noqa: E501 |
7 | 7 |
|
8 | 8 | OpenAPI spec version: v1 |
9 | 9 | Contact: contact@bimdata.io |
@@ -535,6 +535,122 @@ def full_update_cloud_with_http_info(self, id, cloud, **kwargs): # noqa: E501 |
535 | 535 | _request_timeout=local_var_params.get('_request_timeout'), |
536 | 536 | collection_formats=collection_formats) |
537 | 537 |
|
| 538 | + def full_update_cloud_user(self, cloud_pk, id, user_cloud_update, **kwargs): # noqa: E501 |
| 539 | + """full_update_cloud_user # noqa: E501 |
| 540 | +
|
| 541 | + Change the user role in the cloud # noqa: E501 |
| 542 | + This method makes a synchronous HTTP request by default. To make an |
| 543 | + asynchronous HTTP request, please pass async_req=True |
| 544 | + >>> thread = api.full_update_cloud_user(cloud_pk, id, user_cloud_update, async_req=True) |
| 545 | + >>> result = thread.get() |
| 546 | +
|
| 547 | + :param async_req bool |
| 548 | + :param str cloud_pk: (required) |
| 549 | + :param str id: (required) |
| 550 | + :param UserCloudUpdate user_cloud_update: (required) |
| 551 | + :return: User |
| 552 | + If the method is called asynchronously, |
| 553 | + returns the request thread. |
| 554 | + """ |
| 555 | + kwargs['_return_http_data_only'] = True |
| 556 | + if kwargs.get('async_req'): |
| 557 | + return self.full_update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, **kwargs) # noqa: E501 |
| 558 | + else: |
| 559 | + (data) = self.full_update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, **kwargs) # noqa: E501 |
| 560 | + return data |
| 561 | + |
| 562 | + def full_update_cloud_user_with_http_info(self, cloud_pk, id, user_cloud_update, **kwargs): # noqa: E501 |
| 563 | + """full_update_cloud_user # noqa: E501 |
| 564 | +
|
| 565 | + Change the user role in the cloud # noqa: E501 |
| 566 | + This method makes a synchronous HTTP request by default. To make an |
| 567 | + asynchronous HTTP request, please pass async_req=True |
| 568 | + >>> thread = api.full_update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, async_req=True) |
| 569 | + >>> result = thread.get() |
| 570 | +
|
| 571 | + :param async_req bool |
| 572 | + :param str cloud_pk: (required) |
| 573 | + :param str id: (required) |
| 574 | + :param UserCloudUpdate user_cloud_update: (required) |
| 575 | + :return: User |
| 576 | + If the method is called asynchronously, |
| 577 | + returns the request thread. |
| 578 | + """ |
| 579 | + |
| 580 | + local_var_params = locals() |
| 581 | + |
| 582 | + all_params = ['cloud_pk', 'id', 'user_cloud_update'] # noqa: E501 |
| 583 | + all_params.append('async_req') |
| 584 | + all_params.append('_return_http_data_only') |
| 585 | + all_params.append('_preload_content') |
| 586 | + all_params.append('_request_timeout') |
| 587 | + |
| 588 | + for key, val in six.iteritems(local_var_params['kwargs']): |
| 589 | + if key not in all_params: |
| 590 | + raise TypeError( |
| 591 | + "Got an unexpected keyword argument '%s'" |
| 592 | + " to method full_update_cloud_user" % key |
| 593 | + ) |
| 594 | + local_var_params[key] = val |
| 595 | + del local_var_params['kwargs'] |
| 596 | + # verify the required parameter 'cloud_pk' is set |
| 597 | + if ('cloud_pk' not in local_var_params or |
| 598 | + local_var_params['cloud_pk'] is None): |
| 599 | + raise ValueError("Missing the required parameter `cloud_pk` when calling `full_update_cloud_user`") # noqa: E501 |
| 600 | + # verify the required parameter 'id' is set |
| 601 | + if ('id' not in local_var_params or |
| 602 | + local_var_params['id'] is None): |
| 603 | + raise ValueError("Missing the required parameter `id` when calling `full_update_cloud_user`") # noqa: E501 |
| 604 | + # verify the required parameter 'user_cloud_update' is set |
| 605 | + if ('user_cloud_update' not in local_var_params or |
| 606 | + local_var_params['user_cloud_update'] is None): |
| 607 | + raise ValueError("Missing the required parameter `user_cloud_update` when calling `full_update_cloud_user`") # noqa: E501 |
| 608 | + |
| 609 | + collection_formats = {} |
| 610 | + |
| 611 | + path_params = {} |
| 612 | + if 'cloud_pk' in local_var_params: |
| 613 | + path_params['cloud_pk'] = local_var_params['cloud_pk'] # noqa: E501 |
| 614 | + if 'id' in local_var_params: |
| 615 | + path_params['id'] = local_var_params['id'] # noqa: E501 |
| 616 | + |
| 617 | + query_params = [] |
| 618 | + |
| 619 | + header_params = {} |
| 620 | + |
| 621 | + form_params = [] |
| 622 | + local_var_files = {} |
| 623 | + |
| 624 | + body_params = None |
| 625 | + if 'user_cloud_update' in local_var_params: |
| 626 | + body_params = local_var_params['user_cloud_update'] |
| 627 | + # HTTP header `Accept` |
| 628 | + header_params['Accept'] = self.api_client.select_header_accept( |
| 629 | + ['application/json']) # noqa: E501 |
| 630 | + |
| 631 | + # HTTP header `Content-Type` |
| 632 | + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 |
| 633 | + ['application/json']) # noqa: E501 |
| 634 | + |
| 635 | + # Authentication setting |
| 636 | + auth_settings = ['Bearer'] # noqa: E501 |
| 637 | + |
| 638 | + return self.api_client.call_api( |
| 639 | + '/cloud/{cloud_pk}/user/{id}', 'PUT', |
| 640 | + path_params, |
| 641 | + query_params, |
| 642 | + header_params, |
| 643 | + body=body_params, |
| 644 | + post_params=form_params, |
| 645 | + files=local_var_files, |
| 646 | + response_type='User', # noqa: E501 |
| 647 | + auth_settings=auth_settings, |
| 648 | + async_req=local_var_params.get('async_req'), |
| 649 | + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 |
| 650 | + _preload_content=local_var_params.get('_preload_content', True), |
| 651 | + _request_timeout=local_var_params.get('_request_timeout'), |
| 652 | + collection_formats=collection_formats) |
| 653 | + |
538 | 654 | def get_cloud(self, id, **kwargs): # noqa: E501 |
539 | 655 | """get_cloud # noqa: E501 |
540 | 656 |
|
@@ -1114,3 +1230,119 @@ def update_cloud_with_http_info(self, id, cloud, **kwargs): # noqa: E501 |
1114 | 1230 | _preload_content=local_var_params.get('_preload_content', True), |
1115 | 1231 | _request_timeout=local_var_params.get('_request_timeout'), |
1116 | 1232 | collection_formats=collection_formats) |
| 1233 | + |
| 1234 | + def update_cloud_user(self, cloud_pk, id, user_cloud_update, **kwargs): # noqa: E501 |
| 1235 | + """update_cloud_user # noqa: E501 |
| 1236 | +
|
| 1237 | + Change the user role in the cloud # noqa: E501 |
| 1238 | + This method makes a synchronous HTTP request by default. To make an |
| 1239 | + asynchronous HTTP request, please pass async_req=True |
| 1240 | + >>> thread = api.update_cloud_user(cloud_pk, id, user_cloud_update, async_req=True) |
| 1241 | + >>> result = thread.get() |
| 1242 | +
|
| 1243 | + :param async_req bool |
| 1244 | + :param str cloud_pk: (required) |
| 1245 | + :param str id: (required) |
| 1246 | + :param UserCloudUpdate user_cloud_update: (required) |
| 1247 | + :return: User |
| 1248 | + If the method is called asynchronously, |
| 1249 | + returns the request thread. |
| 1250 | + """ |
| 1251 | + kwargs['_return_http_data_only'] = True |
| 1252 | + if kwargs.get('async_req'): |
| 1253 | + return self.update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, **kwargs) # noqa: E501 |
| 1254 | + else: |
| 1255 | + (data) = self.update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, **kwargs) # noqa: E501 |
| 1256 | + return data |
| 1257 | + |
| 1258 | + def update_cloud_user_with_http_info(self, cloud_pk, id, user_cloud_update, **kwargs): # noqa: E501 |
| 1259 | + """update_cloud_user # noqa: E501 |
| 1260 | +
|
| 1261 | + Change the user role in the cloud # noqa: E501 |
| 1262 | + This method makes a synchronous HTTP request by default. To make an |
| 1263 | + asynchronous HTTP request, please pass async_req=True |
| 1264 | + >>> thread = api.update_cloud_user_with_http_info(cloud_pk, id, user_cloud_update, async_req=True) |
| 1265 | + >>> result = thread.get() |
| 1266 | +
|
| 1267 | + :param async_req bool |
| 1268 | + :param str cloud_pk: (required) |
| 1269 | + :param str id: (required) |
| 1270 | + :param UserCloudUpdate user_cloud_update: (required) |
| 1271 | + :return: User |
| 1272 | + If the method is called asynchronously, |
| 1273 | + returns the request thread. |
| 1274 | + """ |
| 1275 | + |
| 1276 | + local_var_params = locals() |
| 1277 | + |
| 1278 | + all_params = ['cloud_pk', 'id', 'user_cloud_update'] # noqa: E501 |
| 1279 | + all_params.append('async_req') |
| 1280 | + all_params.append('_return_http_data_only') |
| 1281 | + all_params.append('_preload_content') |
| 1282 | + all_params.append('_request_timeout') |
| 1283 | + |
| 1284 | + for key, val in six.iteritems(local_var_params['kwargs']): |
| 1285 | + if key not in all_params: |
| 1286 | + raise TypeError( |
| 1287 | + "Got an unexpected keyword argument '%s'" |
| 1288 | + " to method update_cloud_user" % key |
| 1289 | + ) |
| 1290 | + local_var_params[key] = val |
| 1291 | + del local_var_params['kwargs'] |
| 1292 | + # verify the required parameter 'cloud_pk' is set |
| 1293 | + if ('cloud_pk' not in local_var_params or |
| 1294 | + local_var_params['cloud_pk'] is None): |
| 1295 | + raise ValueError("Missing the required parameter `cloud_pk` when calling `update_cloud_user`") # noqa: E501 |
| 1296 | + # verify the required parameter 'id' is set |
| 1297 | + if ('id' not in local_var_params or |
| 1298 | + local_var_params['id'] is None): |
| 1299 | + raise ValueError("Missing the required parameter `id` when calling `update_cloud_user`") # noqa: E501 |
| 1300 | + # verify the required parameter 'user_cloud_update' is set |
| 1301 | + if ('user_cloud_update' not in local_var_params or |
| 1302 | + local_var_params['user_cloud_update'] is None): |
| 1303 | + raise ValueError("Missing the required parameter `user_cloud_update` when calling `update_cloud_user`") # noqa: E501 |
| 1304 | + |
| 1305 | + collection_formats = {} |
| 1306 | + |
| 1307 | + path_params = {} |
| 1308 | + if 'cloud_pk' in local_var_params: |
| 1309 | + path_params['cloud_pk'] = local_var_params['cloud_pk'] # noqa: E501 |
| 1310 | + if 'id' in local_var_params: |
| 1311 | + path_params['id'] = local_var_params['id'] # noqa: E501 |
| 1312 | + |
| 1313 | + query_params = [] |
| 1314 | + |
| 1315 | + header_params = {} |
| 1316 | + |
| 1317 | + form_params = [] |
| 1318 | + local_var_files = {} |
| 1319 | + |
| 1320 | + body_params = None |
| 1321 | + if 'user_cloud_update' in local_var_params: |
| 1322 | + body_params = local_var_params['user_cloud_update'] |
| 1323 | + # HTTP header `Accept` |
| 1324 | + header_params['Accept'] = self.api_client.select_header_accept( |
| 1325 | + ['application/json']) # noqa: E501 |
| 1326 | + |
| 1327 | + # HTTP header `Content-Type` |
| 1328 | + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 |
| 1329 | + ['application/json']) # noqa: E501 |
| 1330 | + |
| 1331 | + # Authentication setting |
| 1332 | + auth_settings = ['Bearer'] # noqa: E501 |
| 1333 | + |
| 1334 | + return self.api_client.call_api( |
| 1335 | + '/cloud/{cloud_pk}/user/{id}', 'PATCH', |
| 1336 | + path_params, |
| 1337 | + query_params, |
| 1338 | + header_params, |
| 1339 | + body=body_params, |
| 1340 | + post_params=form_params, |
| 1341 | + files=local_var_files, |
| 1342 | + response_type='User', # noqa: E501 |
| 1343 | + auth_settings=auth_settings, |
| 1344 | + async_req=local_var_params.get('async_req'), |
| 1345 | + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 |
| 1346 | + _preload_content=local_var_params.get('_preload_content', True), |
| 1347 | + _request_timeout=local_var_params.get('_request_timeout'), |
| 1348 | + collection_formats=collection_formats) |
0 commit comments