Skip to content

Commit 30a8fb5

Browse files
committed
PATCH: add invitation key in UserProject
1 parent d508862 commit 30a8fb5

28 files changed

+631
-213
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ Class | Method | HTTP request | Description
506506
- [Unit](docs/Unit.md)
507507
- [User](docs/User.md)
508508
- [UserCloudUpdate](docs/UserCloudUpdate.md)
509+
- [UserProject](docs/UserProject.md)
509510
- [UserProjectUpdate](docs/UserProjectUpdate.md)
510511
- [ViewSetupHints](docs/ViewSetupHints.md)
511512
- [Viewpoint](docs/Viewpoint.md)

bimdata_api_client/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
from bimdata_api_client.models.unit import Unit
134134
from bimdata_api_client.models.user import User
135135
from bimdata_api_client.models.user_cloud_update import UserCloudUpdate
136+
from bimdata_api_client.models.user_project import UserProject
136137
from bimdata_api_client.models.user_project_update import UserProjectUpdate
137138
from bimdata_api_client.models.view_setup_hints import ViewSetupHints
138139
from bimdata_api_client.models.viewpoint import Viewpoint

bimdata_api_client/api/collaboration_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def add_group_member(self, cloud_pk, group_pk, project_pk, data, **kwargs): # n
5858
number provided, it will be total request
5959
timeout. It can also be a pair (tuple) of
6060
(connection, read) timeouts.
61-
:return: User
61+
:return: UserProject
6262
If the method is called asynchronously,
6363
returns the request thread.
6464
"""
@@ -88,7 +88,7 @@ def add_group_member_with_http_info(self, cloud_pk, group_pk, project_pk, data,
8888
number provided, it will be total request
8989
timeout. It can also be a pair (tuple) of
9090
(connection, read) timeouts.
91-
:return: tuple(User, status_code(int), headers(HTTPHeaderDict))
91+
:return: tuple(UserProject, status_code(int), headers(HTTPHeaderDict))
9292
If the method is called asynchronously,
9393
returns the request thread.
9494
"""
@@ -174,7 +174,7 @@ def add_group_member_with_http_info(self, cloud_pk, group_pk, project_pk, data,
174174
body=body_params,
175175
post_params=form_params,
176176
files=local_var_files,
177-
response_type='User', # noqa: E501
177+
response_type='UserProject', # noqa: E501
178178
auth_settings=auth_settings,
179179
async_req=local_var_params.get('async_req'),
180180
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501

bimdata_api_client/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
from bimdata_api_client.models.unit import Unit
115115
from bimdata_api_client.models.user import User
116116
from bimdata_api_client.models.user_cloud_update import UserCloudUpdate
117+
from bimdata_api_client.models.user_project import UserProject
117118
from bimdata_api_client.models.user_project_update import UserProjectUpdate
118119
from bimdata_api_client.models.view_setup_hints import ViewSetupHints
119120
from bimdata_api_client.models.viewpoint import Viewpoint

bimdata_api_client/models/inline_object3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class InlineObject3(object):
3737
'id': 'int',
3838
'name': 'str',
3939
'color': 'str',
40-
'members': 'list[User]'
40+
'members': 'list[UserProject]'
4141
}
4242

4343
attribute_map = {
@@ -148,7 +148,7 @@ def members(self):
148148
149149
150150
:return: The members of this InlineObject3. # noqa: E501
151-
:rtype: list[User]
151+
:rtype: list[UserProject]
152152
"""
153153
return self._members
154154

@@ -158,7 +158,7 @@ def members(self, members):
158158
159159
160160
:param members: The members of this InlineObject3. # noqa: E501
161-
:type: list[User]
161+
:type: list[UserProject]
162162
"""
163163

164164
self._members = members

bimdata_api_client/models/inline_object4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class InlineObject4(object):
3737
'id': 'int',
3838
'name': 'str',
3939
'color': 'str',
40-
'members': 'list[User]'
40+
'members': 'list[UserProject]'
4141
}
4242

4343
attribute_map = {
@@ -148,7 +148,7 @@ def members(self):
148148
149149
150150
:return: The members of this InlineObject4. # noqa: E501
151-
:rtype: list[User]
151+
:rtype: list[UserProject]
152152
"""
153153
return self._members
154154

@@ -158,7 +158,7 @@ def members(self, members):
158158
159159
160160
:param members: The members of this InlineObject4. # noqa: E501
161-
:type: list[User]
161+
:type: list[UserProject]
162162
"""
163163

164164
self._members = members

bimdata_api_client/models/inline_object5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class InlineObject5(object):
3737
'id': 'int',
3838
'name': 'str',
3939
'color': 'str',
40-
'members': 'list[User]'
40+
'members': 'list[UserProject]'
4141
}
4242

4343
attribute_map = {
@@ -148,7 +148,7 @@ def members(self):
148148
149149
150150
:return: The members of this InlineObject5. # noqa: E501
151-
:rtype: list[User]
151+
:rtype: list[UserProject]
152152
"""
153153
return self._members
154154

@@ -158,7 +158,7 @@ def members(self, members):
158158
159159
160160
:param members: The members of this InlineObject5. # noqa: E501
161-
:type: list[User]
161+
:type: list[UserProject]
162162
"""
163163

164164
self._members = members

bimdata_api_client/models/inline_response2001.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class InlineResponse2001(object):
3737
'id': 'int',
3838
'name': 'str',
3939
'color': 'str',
40-
'members': 'list[User]'
40+
'members': 'list[UserProject]'
4141
}
4242

4343
attribute_map = {
@@ -148,7 +148,7 @@ def members(self):
148148
149149
150150
:return: The members of this InlineResponse2001. # noqa: E501
151-
:rtype: list[User]
151+
:rtype: list[UserProject]
152152
"""
153153
return self._members
154154

@@ -158,7 +158,7 @@ def members(self, members):
158158
159159
160160
:param members: The members of this InlineResponse2001. # noqa: E501
161-
:type: list[User]
161+
:type: list[UserProject]
162162
"""
163163

164164
self._members = members
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# coding: utf-8
2+
3+
"""
4+
BIMData API
5+
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+
8+
The version of the OpenAPI document: v1
9+
Contact: support@bimdata.io
10+
Generated by: https://openapi-generator.tech
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from bimdata_api_client.configuration import Configuration
20+
21+
22+
class UserProject(object):
23+
"""NOTE: This class is auto generated by OpenAPI Generator.
24+
Ref: https://openapi-generator.tech
25+
26+
Do not edit the class manually.
27+
"""
28+
29+
"""
30+
Attributes:
31+
openapi_types (dict): The key is attribute name
32+
and the value is attribute type.
33+
attribute_map (dict): The key is attribute name
34+
and the value is json key in definition.
35+
"""
36+
openapi_types = {
37+
'role': 'int',
38+
'user': 'User',
39+
'invitation': 'ProjectInvitation',
40+
'project': 'int'
41+
}
42+
43+
attribute_map = {
44+
'role': 'role',
45+
'user': 'user',
46+
'invitation': 'invitation',
47+
'project': 'project'
48+
}
49+
50+
def __init__(self, role=None, user=None, invitation=None, project=None, local_vars_configuration=None): # noqa: E501
51+
"""UserProject - a model defined in OpenAPI""" # noqa: E501
52+
if local_vars_configuration is None:
53+
local_vars_configuration = Configuration()
54+
self.local_vars_configuration = local_vars_configuration
55+
56+
self._role = None
57+
self._user = None
58+
self._invitation = None
59+
self._project = None
60+
self.discriminator = None
61+
62+
if role is not None:
63+
self.role = role
64+
if user is not None:
65+
self.user = user
66+
if invitation is not None:
67+
self.invitation = invitation
68+
self.project = project
69+
70+
@property
71+
def role(self):
72+
"""Gets the role of this UserProject. # noqa: E501
73+
74+
User's role in the project # noqa: E501
75+
76+
:return: The role of this UserProject. # noqa: E501
77+
:rtype: int
78+
"""
79+
return self._role
80+
81+
@role.setter
82+
def role(self, role):
83+
"""Sets the role of this UserProject.
84+
85+
User's role in the project # noqa: E501
86+
87+
:param role: The role of this UserProject. # noqa: E501
88+
:type: int
89+
"""
90+
91+
self._role = role
92+
93+
@property
94+
def user(self):
95+
"""Gets the user of this UserProject. # noqa: E501
96+
97+
98+
:return: The user of this UserProject. # noqa: E501
99+
:rtype: User
100+
"""
101+
return self._user
102+
103+
@user.setter
104+
def user(self, user):
105+
"""Sets the user of this UserProject.
106+
107+
108+
:param user: The user of this UserProject. # noqa: E501
109+
:type: User
110+
"""
111+
112+
self._user = user
113+
114+
@property
115+
def invitation(self):
116+
"""Gets the invitation of this UserProject. # noqa: E501
117+
118+
119+
:return: The invitation of this UserProject. # noqa: E501
120+
:rtype: ProjectInvitation
121+
"""
122+
return self._invitation
123+
124+
@invitation.setter
125+
def invitation(self, invitation):
126+
"""Sets the invitation of this UserProject.
127+
128+
129+
:param invitation: The invitation of this UserProject. # noqa: E501
130+
:type: ProjectInvitation
131+
"""
132+
133+
self._invitation = invitation
134+
135+
@property
136+
def project(self):
137+
"""Gets the project of this UserProject. # noqa: E501
138+
139+
140+
:return: The project of this UserProject. # noqa: E501
141+
:rtype: int
142+
"""
143+
return self._project
144+
145+
@project.setter
146+
def project(self, project):
147+
"""Sets the project of this UserProject.
148+
149+
150+
:param project: The project of this UserProject. # noqa: E501
151+
:type: int
152+
"""
153+
if self.local_vars_configuration.client_side_validation and project is None: # noqa: E501
154+
raise ValueError("Invalid value for `project`, must not be `None`") # noqa: E501
155+
156+
self._project = project
157+
158+
def to_dict(self):
159+
"""Returns the model properties as a dict"""
160+
result = {}
161+
162+
for attr, _ in six.iteritems(self.openapi_types):
163+
value = getattr(self, attr)
164+
if isinstance(value, list):
165+
result[attr] = list(map(
166+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
167+
value
168+
))
169+
elif hasattr(value, "to_dict"):
170+
result[attr] = value.to_dict()
171+
elif isinstance(value, dict):
172+
result[attr] = dict(map(
173+
lambda item: (item[0], item[1].to_dict())
174+
if hasattr(item[1], "to_dict") else item,
175+
value.items()
176+
))
177+
else:
178+
result[attr] = value
179+
180+
return result
181+
182+
def to_str(self):
183+
"""Returns the string representation of the model"""
184+
return pprint.pformat(self.to_dict())
185+
186+
def __repr__(self):
187+
"""For `print` and `pprint`"""
188+
return self.to_str()
189+
190+
def __eq__(self, other):
191+
"""Returns true if both objects are equal"""
192+
if not isinstance(other, UserProject):
193+
return False
194+
195+
return self.to_dict() == other.to_dict()
196+
197+
def __ne__(self, other):
198+
"""Returns true if both objects are not equal"""
199+
if not isinstance(other, UserProject):
200+
return True
201+
202+
return self.to_dict() != other.to_dict()

docs/CollaborationApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Method | HTTP request | Description
8282

8383

8484
# **add_group_member**
85-
> User add_group_member(cloud_pk, group_pk, project_pk, data)
85+
> UserProject add_group_member(cloud_pk, group_pk, project_pk, data)
8686

8787
Add a user to a group
8888

@@ -272,7 +272,7 @@ Name | Type | Description | Notes
272272

273273
### Return type
274274

275-
[**User**](User.md)
275+
[**UserProject**](UserProject.md)
276276

277277
### Authorization
278278

0 commit comments

Comments
 (0)