Skip to content

Commit cecef31

Browse files
committed
PATCH: add group short name. (#920)
1 parent 36f19b8 commit cecef31

14 files changed

+69
-43
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8940,7 +8940,7 @@ def create_document(
89408940
):
89418941
"""Create a document # noqa: E501
89428942

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

bimdata_api_client/model/document_text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61+
'GERMAN': "german",
6162
'FRENCH': "french",
6263
'ITALIAN': "italian",
6364
'ENGLISH': "english",
6465
'SPANISH': "spanish",
65-
'GERMAN': "german",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish * `german` - german. [optional] # noqa: E501
156+
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish * `german` - german. [optional] # noqa: E501
240+
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/group.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ class Group(ModelNormal):
6666
('name',): {
6767
'max_length': 512,
6868
},
69+
('short_name',): {
70+
'max_length': 128,
71+
},
6972
('color',): {
7073
'max_length': 255,
7174
},
@@ -97,6 +100,7 @@ def openapi_types():
97100
'id': (int,), # noqa: E501
98101
'name': (str,), # noqa: E501
99102
'members': ([UserProject],), # noqa: E501
103+
'short_name': (str, none_type,), # noqa: E501
100104
'color': (str, none_type,), # noqa: E501
101105
}
102106

@@ -109,6 +113,7 @@ def discriminator():
109113
'id': 'id', # noqa: E501
110114
'name': 'name', # noqa: E501
111115
'members': 'members', # noqa: E501
116+
'short_name': 'short_name', # noqa: E501
112117
'color': 'color', # noqa: E501
113118
}
114119

@@ -160,6 +165,7 @@ def _from_openapi_data(cls, id, name, members, *args, **kwargs): # noqa: E501
160165
Animal class but this time we won't travel
161166
through its discriminator because we passed in
162167
_visited_composed_classes = (Animal,)
168+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
163169
color (str, none_type): [optional] # noqa: E501
164170
"""
165171

@@ -246,6 +252,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
246252
Animal class but this time we won't travel
247253
through its discriminator because we passed in
248254
_visited_composed_classes = (Animal,)
255+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
249256
color (str, none_type): [optional] # noqa: E501
250257
"""
251258

bimdata_api_client/model/group_request.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class GroupRequest(ModelNormal):
6363
'max_length': 512,
6464
'min_length': 1,
6565
},
66+
('short_name',): {
67+
'max_length': 128,
68+
},
6669
('color',): {
6770
'max_length': 255,
6871
},
@@ -90,6 +93,7 @@ def openapi_types():
9093
"""
9194
return {
9295
'name': (str,), # noqa: E501
96+
'short_name': (str, none_type,), # noqa: E501
9397
'color': (str, none_type,), # noqa: E501
9498
}
9599

@@ -100,6 +104,7 @@ def discriminator():
100104

101105
attribute_map = {
102106
'name': 'name', # noqa: E501
107+
'short_name': 'short_name', # noqa: E501
103108
'color': 'color', # noqa: E501
104109
}
105110

@@ -147,6 +152,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
147152
Animal class but this time we won't travel
148153
through its discriminator because we passed in
149154
_visited_composed_classes = (Animal,)
155+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
150156
color (str, none_type): [optional] # noqa: E501
151157
"""
152158

@@ -233,6 +239,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
233239
Animal class but this time we won't travel
234240
through its discriminator because we passed in
235241
_visited_composed_classes = (Animal,)
242+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
236243
color (str, none_type): [optional] # noqa: E501
237244
"""
238245

bimdata_api_client/model/patched_document_text_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class PatchedDocumentTextRequest(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61+
'GERMAN': "german",
6162
'FRENCH': "french",
6263
'ITALIAN': "italian",
6364
'ENGLISH': "english",
6465
'SPANISH': "spanish",
65-
'GERMAN': "german",
6666
'NULL': "null",
6767
},
6868
}
@@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
147147
through its discriminator because we passed in
148148
_visited_composed_classes = (Animal,)
149149
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
150-
language (str, none_type): * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish * `german` - german. [optional] # noqa: E501
150+
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
151151
"""
152152

153153
_check_type = kwargs.pop('_check_type', True)
@@ -230,7 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
230230
through its discriminator because we passed in
231231
_visited_composed_classes = (Animal,)
232232
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
233-
language (str, none_type): * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish * `german` - german. [optional] # noqa: E501
233+
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
234234
"""
235235

236236
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/patched_group_request.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class PatchedGroupRequest(ModelNormal):
6363
'max_length': 512,
6464
'min_length': 1,
6565
},
66+
('short_name',): {
67+
'max_length': 128,
68+
},
6669
('color',): {
6770
'max_length': 255,
6871
},
@@ -90,6 +93,7 @@ def openapi_types():
9093
"""
9194
return {
9295
'name': (str,), # noqa: E501
96+
'short_name': (str, none_type,), # noqa: E501
9397
'color': (str, none_type,), # noqa: E501
9498
}
9599

@@ -100,6 +104,7 @@ def discriminator():
100104

101105
attribute_map = {
102106
'name': 'name', # noqa: E501
107+
'short_name': 'short_name', # noqa: E501
103108
'color': 'color', # noqa: E501
104109
}
105110

@@ -145,6 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
145150
through its discriminator because we passed in
146151
_visited_composed_classes = (Animal,)
147152
name (str): Full name of the group. [optional] # noqa: E501
153+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
148154
color (str, none_type): [optional] # noqa: E501
149155
"""
150156

@@ -228,6 +234,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
228234
through its discriminator because we passed in
229235
_visited_composed_classes = (Animal,)
230236
name (str): Full name of the group. [optional] # noqa: E501
237+
short_name (str, none_type): Short name of the group. [optional] # noqa: E501
231238
color (str, none_type): [optional] # noqa: E501
232239
"""
233240

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+
'created_at': (datetime,), # noqa: E501
111+
'id': (int,), # noqa: E501
110112
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
111-
'user_permission': (int,), # noqa: E501
112-
'name': (str,), # noqa: E501
113113
'type': (str,), # noqa: E501
114-
'id': (int,), # noqa: E501
115-
'updated_at': (datetime,), # noqa: E501
114+
'user_permission': (int,), # noqa: E501
116115
'groups_permissions': ([GroupFolderRead],), # noqa: E501
117-
'created_at': (datetime,), # noqa: E501
116+
'name': (str,), # noqa: E501
118117
'nature': (str,), # noqa: E501
118+
'updated_at': (datetime,), # 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+
'created_at': 'created_at', # noqa: E501
131+
'id': 'id', # noqa: E501
130132
'created_by': 'created_by', # noqa: E501
131-
'user_permission': 'user_permission', # noqa: E501
132-
'name': 'name', # noqa: E501
133133
'type': 'type', # noqa: E501
134-
'id': 'id', # noqa: E501
135-
'updated_at': 'updated_at', # noqa: E501
134+
'user_permission': 'user_permission', # noqa: E501
136135
'groups_permissions': 'groups_permissions', # noqa: E501
137-
'created_at': 'created_at', # noqa: E501
136+
'name': 'name', # noqa: E501
138137
'nature': 'nature', # noqa: E501
138+
'updated_at': 'updated_at', # 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+
'created_at', # noqa: E501
146+
'id', # noqa: E501
145147
'created_by', # noqa: E501
146-
'user_permission', # noqa: E501
147148
'type', # noqa: E501
148-
'id', # noqa: E501
149-
'updated_at', # noqa: E501
149+
'user_permission', # noqa: E501
150150
'groups_permissions', # noqa: E501
151-
'created_at', # noqa: E501
152151
'nature', # noqa: E501
152+
'updated_at', # noqa: E501
153153
}
154154

155155
_composed_schemas = {}
156156

157157
@classmethod
158158
@convert_js_args_to_python_args
159-
def _from_openapi_data(cls, created_by, user_permission, name, type, id, updated_at, groups_permissions, created_at, nature, *args, **kwargs): # noqa: E501
159+
def _from_openapi_data(cls, created_at, id, created_by, type, user_permission, groups_permissions, name, nature, updated_at, *args, **kwargs): # noqa: E501
160160
"""WriteFolder - a model defined in OpenAPI
161161
162162
Args:
163+
created_at (datetime): Creation date
164+
id (int):
163165
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
164-
user_permission (int): Aggregate of group user permissions and folder default permission
165-
name (str): Name of the folder
166166
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
167-
id (int):
168-
updated_at (datetime): Date of the last update
167+
user_permission (int): Aggregate of group user permissions and folder default permission
169168
groups_permissions ([GroupFolderRead]): List of group permissions
170-
created_at (datetime): Creation date
169+
name (str): Name of the folder
171170
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
171+
updated_at (datetime): Date of the last update
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, created_by, user_permission, name, type, id, updated
231231
self._configuration = _configuration
232232
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
233233

234+
self.created_at = created_at
235+
self.id = id
234236
self.created_by = created_by
235-
self.user_permission = user_permission
236-
self.name = name
237237
self.type = type
238-
self.id = id
239-
self.updated_at = updated_at
238+
self.user_permission = user_permission
240239
self.groups_permissions = groups_permissions
241-
self.created_at = created_at
240+
self.name = name
242241
self.nature = nature
242+
self.updated_at = updated_at
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,14 +1482,14 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
14821482
id = 1 # int | A unique integer value identifying this project.
14831483
write_folder_request = [
14841484
WriteFolderRequest(
1485-
name="name_example",
14861485
default_permission=1,
14871486
parent_id=1,
1487+
name="name_example",
14881488
children=[
14891489
WriteFolder(
1490-
name="name_example",
14911490
default_permission=1,
14921491
parent_id=1,
1492+
name="name_example",
14931493
children=None,
14941494
),
14951495
],
@@ -1546,7 +1546,7 @@ Name | Type | Description | Notes
15461546

15471547
Create a document
15481548

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

15511551
### Example
15521552

@@ -1853,6 +1853,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
18531853
project_pk = 1 # int | A unique integer value identifying this project.
18541854
group_request = GroupRequest(
18551855
name="name_example",
1856+
short_name="short_name_example",
18561857
color="color_example",
18571858
) # GroupRequest |
18581859

@@ -11032,7 +11033,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1103211033
project_pk = 1 # int | A unique integer value identifying this project.
1103311034
patched_document_text_request = PatchedDocumentTextRequest(
1103411035
text="text_example",
11035-
language="french",
11036+
language="german",
1103611037
) # PatchedDocumentTextRequest | (optional)
1103711038

1103811039
# example passing only required values which don't have defaults set
@@ -11405,6 +11406,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1140511406
project_pk = 1 # int | A unique integer value identifying this project.
1140611407
patched_group_request = PatchedGroupRequest(
1140711408
name="name_example",
11409+
short_name="short_name_example",
1140811410
color="color_example",
1140911411
) # PatchedGroupRequest | (optional)
1141011412

docs/DocumentText.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **int** | | [readonly]
88
**text** | **str, none_type** | The full text representation of a document if the feature is enabled and the file format supported | [optional]
9-
**language** | **str, none_type** | * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish * `german` - german | [optional]
9+
**language** | **str, none_type** | * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish | [optional]
1010
**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]
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Group.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**id** | **int** | | [readonly]
88
**name** | **str** | Full name of the group |
99
**members** | [**[UserProject]**](UserProject.md) | | [readonly]
10+
**short_name** | **str, none_type** | Short name of the group | [optional]
1011
**color** | **str, none_type** | | [optional]
1112
**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]
1213

0 commit comments

Comments
 (0)