Skip to content

Commit 7519d93

Browse files
committed
PATCH: fix list/create methods openAPI
1 parent 132889e commit 7519d93

22 files changed

+1550
-73
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Class | Method | HTTP request | Description
221221
*CollaborationApi* | [**get_classifications**](docs/CollaborationApi.md#get_classifications) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification | Retrieve all classifications
222222
*CollaborationApi* | [**get_cloud**](docs/CollaborationApi.md#get_cloud) | **GET** /cloud/{id} | Retrieve one cloud
223223
*CollaborationApi* | [**get_cloud_invitations**](docs/CollaborationApi.md#get_cloud_invitations) | **GET** /cloud/{cloud_pk}/invitation | Retrieve all pending invitations in the cloud
224-
*CollaborationApi* | [**get_cloud_size**](docs/CollaborationApi.md#get_cloud_size) | **GET** /cloud/{id}/size | Get size of all ifc files in the cloud
224+
*CollaborationApi* | [**get_cloud_size**](docs/CollaborationApi.md#get_cloud_size) | **GET** /cloud/{id}/size | Returns the sizes of the cloud in Bytes.
225225
*CollaborationApi* | [**get_cloud_user**](docs/CollaborationApi.md#get_cloud_user) | **GET** /cloud/{cloud_pk}/user/{id} | Retrieve a user in a cloud
226226
*CollaborationApi* | [**get_cloud_users**](docs/CollaborationApi.md#get_cloud_users) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud, or a list with a filter by email
227227
*CollaborationApi* | [**get_clouds**](docs/CollaborationApi.md#get_clouds) | **GET** /cloud | Retrieve all clouds
@@ -238,6 +238,7 @@ Class | Method | HTTP request | Description
238238
*CollaborationApi* | [**get_project_access_tokens**](docs/CollaborationApi.md#get_project_access_tokens) | **GET** /cloud/{cloud_pk}/project/{project_pk}/access-token | Retrieve all tokens created for this project
239239
*CollaborationApi* | [**get_project_dms_tree**](docs/CollaborationApi.md#get_project_dms_tree) | **GET** /cloud/{cloud_pk}/project/{id}/dms-tree | Retrieve the complete DMS tree
240240
*CollaborationApi* | [**get_project_invitations**](docs/CollaborationApi.md#get_project_invitations) | **GET** /cloud/{cloud_pk}/project/{project_pk}/invitation | Retrieve all pending invitations in the project
241+
*CollaborationApi* | [**get_project_size**](docs/CollaborationApi.md#get_project_size) | **GET** /cloud/{cloud_pk}/project/{id}/size | Get size of all ifc files in the project
241242
*CollaborationApi* | [**get_project_sub_tree**](docs/CollaborationApi.md#get_project_sub_tree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
242243
*CollaborationApi* | [**get_project_tree**](docs/CollaborationApi.md#get_project_tree) | **GET** /cloud/{cloud_pk}/project/{id}/tree | Retrieve the complete DMS tree
243244
*CollaborationApi* | [**get_project_user**](docs/CollaborationApi.md#get_project_user) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Retrieve a user in a project
@@ -421,6 +422,8 @@ Class | Method | HTTP request | Description
421422
- [Direction](docs/Direction.md)
422423
- [Document](docs/Document.md)
423424
- [Element](docs/Element.md)
425+
- [ElementClassificationRelation](docs/ElementClassificationRelation.md)
426+
- [ElementPropertySetRelation](docs/ElementPropertySetRelation.md)
424427
- [Extensions](docs/Extensions.md)
425428
- [Feature](docs/Feature.md)
426429
- [Folder](docs/Folder.md)
@@ -467,6 +470,7 @@ Class | Method | HTTP request | Description
467470
- [ProjectAccessToken](docs/ProjectAccessToken.md)
468471
- [ProjectInvitation](docs/ProjectInvitation.md)
469472
- [ProjectRole](docs/ProjectRole.md)
473+
- [ProjectSize](docs/ProjectSize.md)
470474
- [ProjectWithChildren](docs/ProjectWithChildren.md)
471475
- [PropertyDefinition](docs/PropertyDefinition.md)
472476
- [PropertySet](docs/PropertySet.md)
@@ -491,6 +495,7 @@ Class | Method | HTTP request | Description
491495
- [SelfBcfUser](docs/SelfBcfUser.md)
492496
- [SelfUser](docs/SelfUser.md)
493497
- [SimpleElement](docs/SimpleElement.md)
498+
- [Size](docs/Size.md)
494499
- [Snapshot](docs/Snapshot.md)
495500
- [Space](docs/Space.md)
496501
- [Stage](docs/Stage.md)

bimdata_api_client/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
from bimdata_api_client.models.direction import Direction
5050
from bimdata_api_client.models.document import Document
5151
from bimdata_api_client.models.element import Element
52+
from bimdata_api_client.models.element_classification_relation import ElementClassificationRelation
53+
from bimdata_api_client.models.element_property_set_relation import ElementPropertySetRelation
5254
from bimdata_api_client.models.extensions import Extensions
5355
from bimdata_api_client.models.feature import Feature
5456
from bimdata_api_client.models.folder import Folder
@@ -95,6 +97,7 @@
9597
from bimdata_api_client.models.project_access_token import ProjectAccessToken
9698
from bimdata_api_client.models.project_invitation import ProjectInvitation
9799
from bimdata_api_client.models.project_role import ProjectRole
100+
from bimdata_api_client.models.project_size import ProjectSize
98101
from bimdata_api_client.models.project_with_children import ProjectWithChildren
99102
from bimdata_api_client.models.property_definition import PropertyDefinition
100103
from bimdata_api_client.models.property_set import PropertySet
@@ -119,6 +122,7 @@
119122
from bimdata_api_client.models.self_bcf_user import SelfBcfUser
120123
from bimdata_api_client.models.self_user import SelfUser
121124
from bimdata_api_client.models.simple_element import SimpleElement
125+
from bimdata_api_client.models.size import Size
122126
from bimdata_api_client.models.snapshot import Snapshot
123127
from bimdata_api_client.models.space import Space
124128
from bimdata_api_client.models.stage import Stage

bimdata_api_client/api/collaboration_api.py

Lines changed: 134 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,8 @@ def create_document_with_http_info(self, cloud_pk, project_pk, name, file, **kwa
11701170
if self.api_client.client_side_validation and ('file_name' in local_var_params and # noqa: E501
11711171
len(local_var_params['file_name']) < 1): # noqa: E501
11721172
raise ApiValueError("Invalid value for parameter `file_name` when calling `create_document`, length must be greater than or equal to `1`") # noqa: E501
1173-
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 2147483647: # noqa: E501
1174-
raise ApiValueError("Invalid value for parameter `size` when calling `create_document`, must be a value less than or equal to `2147483647`") # noqa: E501
1173+
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 9223372036854775807: # noqa: E501
1174+
raise ApiValueError("Invalid value for parameter `size` when calling `create_document`, must be a value less than or equal to `9223372036854775807`") # noqa: E501
11751175
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 0: # noqa: E501
11761176
raise ApiValueError("Invalid value for parameter `size` when calling `create_document`, must be a value greater than or equal to `0`") # noqa: E501
11771177
collection_formats = {}
@@ -3569,8 +3569,8 @@ def full_update_document_with_http_info(self, cloud_pk, id, project_pk, name, fi
35693569
if self.api_client.client_side_validation and ('file_name' in local_var_params and # noqa: E501
35703570
len(local_var_params['file_name']) < 1): # noqa: E501
35713571
raise ApiValueError("Invalid value for parameter `file_name` when calling `full_update_document`, length must be greater than or equal to `1`") # noqa: E501
3572-
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 2147483647: # noqa: E501
3573-
raise ApiValueError("Invalid value for parameter `size` when calling `full_update_document`, must be a value less than or equal to `2147483647`") # noqa: E501
3572+
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 9223372036854775807: # noqa: E501
3573+
raise ApiValueError("Invalid value for parameter `size` when calling `full_update_document`, must be a value less than or equal to `9223372036854775807`") # noqa: E501
35743574
if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 0: # noqa: E501
35753575
raise ApiValueError("Invalid value for parameter `size` when calling `full_update_document`, must be a value greater than or equal to `0`") # noqa: E501
35763576
collection_formats = {}
@@ -4988,9 +4988,9 @@ def get_cloud_invitations_with_http_info(self, cloud_pk, **kwargs): # noqa: E50
49884988
collection_formats=collection_formats)
49894989

49904990
def get_cloud_size(self, id, **kwargs): # noqa: E501
4991-
"""Get size of all ifc files in the cloud # noqa: E501
4991+
"""Returns the sizes of the cloud in Bytes. # noqa: E501
49924992
4993-
Returns the size of the cloud in Bytes # noqa: E501
4993+
Returns the sizes of the cloud in Bytes. The response fields depends on the role of the user. If the user is an admin, all field will be returned. If the user is a standard user, only `remaining_total_size` and `remaining_smart_data_size` will be set. If the call is made from an API access, role admin (100) will be returned and all fields will be set. The fields `managed by` indicate if the subscription for this cloud is an API subscription or a BIMData Platform subscription. If the cloud is managed by an API plan, the remaining sizes will take others organizations's clouds size into account # noqa: E501
49944994
This method makes a synchronous HTTP request by default. To make an
49954995
asynchronous HTTP request, please pass async_req=True
49964996
>>> thread = api.get_cloud_size(id, async_req=True)
@@ -5005,17 +5005,17 @@ def get_cloud_size(self, id, **kwargs): # noqa: E501
50055005
number provided, it will be total request
50065006
timeout. It can also be a pair (tuple) of
50075007
(connection, read) timeouts.
5008-
:return: int
5008+
:return: Size
50095009
If the method is called asynchronously,
50105010
returns the request thread.
50115011
"""
50125012
kwargs['_return_http_data_only'] = True
50135013
return self.get_cloud_size_with_http_info(id, **kwargs) # noqa: E501
50145014

50155015
def get_cloud_size_with_http_info(self, id, **kwargs): # noqa: E501
5016-
"""Get size of all ifc files in the cloud # noqa: E501
5016+
"""Returns the sizes of the cloud in Bytes. # noqa: E501
50175017
5018-
Returns the size of the cloud in Bytes # noqa: E501
5018+
Returns the sizes of the cloud in Bytes. The response fields depends on the role of the user. If the user is an admin, all field will be returned. If the user is a standard user, only `remaining_total_size` and `remaining_smart_data_size` will be set. If the call is made from an API access, role admin (100) will be returned and all fields will be set. The fields `managed by` indicate if the subscription for this cloud is an API subscription or a BIMData Platform subscription. If the cloud is managed by an API plan, the remaining sizes will take others organizations's clouds size into account # noqa: E501
50195019
This method makes a synchronous HTTP request by default. To make an
50205020
asynchronous HTTP request, please pass async_req=True
50215021
>>> thread = api.get_cloud_size_with_http_info(id, async_req=True)
@@ -5032,7 +5032,7 @@ def get_cloud_size_with_http_info(self, id, **kwargs): # noqa: E501
50325032
number provided, it will be total request
50335033
timeout. It can also be a pair (tuple) of
50345034
(connection, read) timeouts.
5035-
:return: tuple(int, status_code(int), headers(HTTPHeaderDict))
5035+
:return: tuple(Size, status_code(int), headers(HTTPHeaderDict))
50365036
If the method is called asynchronously,
50375037
returns the request thread.
50385038
"""
@@ -5093,7 +5093,7 @@ def get_cloud_size_with_http_info(self, id, **kwargs): # noqa: E501
50935093
body=body_params,
50945094
post_params=form_params,
50955095
files=local_var_files,
5096-
response_type='int', # noqa: E501
5096+
response_type='Size', # noqa: E501
50975097
auth_settings=auth_settings,
50985098
async_req=local_var_params.get('async_req'),
50995099
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -7107,6 +7107,129 @@ def get_project_invitations_with_http_info(self, cloud_pk, project_pk, **kwargs)
71077107
_request_timeout=local_var_params.get('_request_timeout'),
71087108
collection_formats=collection_formats)
71097109

7110+
def get_project_size(self, cloud_pk, id, **kwargs): # noqa: E501
7111+
"""Get size of all ifc files in the project # noqa: E501
7112+
7113+
Returns the size of the project in Bytes # noqa: E501
7114+
This method makes a synchronous HTTP request by default. To make an
7115+
asynchronous HTTP request, please pass async_req=True
7116+
>>> thread = api.get_project_size(cloud_pk, id, async_req=True)
7117+
>>> result = thread.get()
7118+
7119+
:param async_req bool: execute request asynchronously
7120+
:param str cloud_pk: (required)
7121+
:param int id: A unique integer value identifying this project. (required)
7122+
:param _preload_content: if False, the urllib3.HTTPResponse object will
7123+
be returned without reading/decoding response
7124+
data. Default is True.
7125+
:param _request_timeout: timeout setting for this request. If one
7126+
number provided, it will be total request
7127+
timeout. It can also be a pair (tuple) of
7128+
(connection, read) timeouts.
7129+
:return: ProjectSize
7130+
If the method is called asynchronously,
7131+
returns the request thread.
7132+
"""
7133+
kwargs['_return_http_data_only'] = True
7134+
return self.get_project_size_with_http_info(cloud_pk, id, **kwargs) # noqa: E501
7135+
7136+
def get_project_size_with_http_info(self, cloud_pk, id, **kwargs): # noqa: E501
7137+
"""Get size of all ifc files in the project # noqa: E501
7138+
7139+
Returns the size of the project in Bytes # noqa: E501
7140+
This method makes a synchronous HTTP request by default. To make an
7141+
asynchronous HTTP request, please pass async_req=True
7142+
>>> thread = api.get_project_size_with_http_info(cloud_pk, id, async_req=True)
7143+
>>> result = thread.get()
7144+
7145+
:param async_req bool: execute request asynchronously
7146+
:param str cloud_pk: (required)
7147+
:param int id: A unique integer value identifying this project. (required)
7148+
:param _return_http_data_only: response data without head status code
7149+
and headers
7150+
:param _preload_content: if False, the urllib3.HTTPResponse object will
7151+
be returned without reading/decoding response
7152+
data. Default is True.
7153+
:param _request_timeout: timeout setting for this request. If one
7154+
number provided, it will be total request
7155+
timeout. It can also be a pair (tuple) of
7156+
(connection, read) timeouts.
7157+
:return: tuple(ProjectSize, status_code(int), headers(HTTPHeaderDict))
7158+
If the method is called asynchronously,
7159+
returns the request thread.
7160+
"""
7161+
7162+
local_var_params = locals()
7163+
7164+
all_params = [
7165+
'cloud_pk',
7166+
'id'
7167+
]
7168+
all_params.extend(
7169+
[
7170+
'async_req',
7171+
'_return_http_data_only',
7172+
'_preload_content',
7173+
'_request_timeout'
7174+
]
7175+
)
7176+
7177+
for key, val in six.iteritems(local_var_params['kwargs']):
7178+
if key not in all_params:
7179+
raise ApiTypeError(
7180+
"Got an unexpected keyword argument '%s'"
7181+
" to method get_project_size" % key
7182+
)
7183+
local_var_params[key] = val
7184+
del local_var_params['kwargs']
7185+
# verify the required parameter 'cloud_pk' is set
7186+
if self.api_client.client_side_validation and ('cloud_pk' not in local_var_params or # noqa: E501
7187+
local_var_params['cloud_pk'] is None): # noqa: E501
7188+
raise ApiValueError("Missing the required parameter `cloud_pk` when calling `get_project_size`") # noqa: E501
7189+
# verify the required parameter 'id' is set
7190+
if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501
7191+
local_var_params['id'] is None): # noqa: E501
7192+
raise ApiValueError("Missing the required parameter `id` when calling `get_project_size`") # noqa: E501
7193+
7194+
collection_formats = {}
7195+
7196+
path_params = {}
7197+
if 'cloud_pk' in local_var_params:
7198+
path_params['cloud_pk'] = local_var_params['cloud_pk'] # noqa: E501
7199+
if 'id' in local_var_params:
7200+
path_params['id'] = local_var_params['id'] # noqa: E501
7201+
7202+
query_params = []
7203+
7204+
header_params = {}
7205+
7206+
form_params = []
7207+
local_var_files = {}
7208+
7209+
body_params = None
7210+
# HTTP header `Accept`
7211+
header_params['Accept'] = self.api_client.select_header_accept(
7212+
['application/json']) # noqa: E501
7213+
7214+
# Authentication setting
7215+
auth_settings = ['Bearer', 'bimdata_connect', 'client_credentials'] # noqa: E501
7216+
7217+
return self.api_client.call_api(
7218+
'/cloud/{cloud_pk}/project/{id}/size', 'GET',
7219+
path_params,
7220+
query_params,
7221+
header_params,
7222+
body=body_params,
7223+
post_params=form_params,
7224+
files=local_var_files,
7225+
response_type='ProjectSize', # noqa: E501
7226+
auth_settings=auth_settings,
7227+
async_req=local_var_params.get('async_req'),
7228+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
7229+
_preload_content=local_var_params.get('_preload_content', True),
7230+
_request_timeout=local_var_params.get('_request_timeout'),
7231+
collection_formats=collection_formats)
7232+
71107233
def get_project_sub_tree(self, cloud_pk, **kwargs): # noqa: E501
71117234
"""Retrieve the complete projects tree of the cloud # noqa: E501
71127235

0 commit comments

Comments
 (0)