Skip to content

Commit cb1f35c

Browse files
committed
PATCH: serialize document creator
1 parent 3075415 commit cb1f35c

File tree

7 files changed

+12
-22
lines changed

7 files changed

+12
-22
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,6 @@ def __init__(self, api_client=None):
824824
'name',
825825
'file',
826826
'parent_id',
827-
'creator',
828827
'file_name',
829828
'description',
830829
'size',
@@ -840,7 +839,6 @@ def __init__(self, api_client=None):
840839
],
841840
'nullable': [
842841
'parent_id',
843-
'creator',
844842
'description',
845843
'size',
846844
],
@@ -899,8 +897,6 @@ def __init__(self, api_client=None):
899897
(file_type,),
900898
'parent_id':
901899
(int, none_type,),
902-
'creator':
903-
(int, none_type,),
904900
'file_name':
905901
(str,),
906902
'description':
@@ -920,7 +916,6 @@ def __init__(self, api_client=None):
920916
'name': 'name',
921917
'file': 'file',
922918
'parent_id': 'parent_id',
923-
'creator': 'creator',
924919
'file_name': 'file_name',
925920
'description': 'description',
926921
'size': 'size',
@@ -934,7 +929,6 @@ def __init__(self, api_client=None):
934929
'name': 'form',
935930
'file': 'form',
936931
'parent_id': 'form',
937-
'creator': 'form',
938932
'file_name': 'form',
939933
'description': 'form',
940934
'size': 'form',
@@ -7785,7 +7779,6 @@ def create_document(
77857779

77867780
Keyword Args:
77877781
parent_id (int, none_type): [optional]
7788-
creator (int, none_type): [optional]
77897782
file_name (str): Full name of the file. [optional]
77907783
description (str, none_type): Description of the file. [optional]
77917784
size (int, none_type): Size of the file.. [optional]

bimdata_api_client/model/document.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232

3333
def lazy_import():
3434
from bimdata_api_client.model.tag import Tag
35+
from bimdata_api_client.model.user import User
3536
globals()['Tag'] = Tag
37+
globals()['User'] = User
3638

3739

3840
class Document(ModelNormal):
@@ -104,6 +106,7 @@ def openapi_types():
104106
lazy_import()
105107
return {
106108
'id': (int,), # noqa: E501
109+
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
107110
'project': (int,), # noqa: E501
108111
'name': (str,), # noqa: E501
109112
'file': (str,), # noqa: E501
@@ -114,7 +117,6 @@ def openapi_types():
114117
'ifc_id': (int, none_type,), # noqa: E501
115118
'user_permission': (int,), # noqa: E501
116119
'parent_id': (int, none_type,), # noqa: E501
117-
'creator': (int, none_type,), # noqa: E501
118120
'file_name': (str,), # noqa: E501
119121
'description': (str, none_type,), # noqa: E501
120122
'size': (int, none_type,), # noqa: E501
@@ -127,6 +129,7 @@ def discriminator():
127129

128130
attribute_map = {
129131
'id': 'id', # noqa: E501
132+
'created_by': 'created_by', # noqa: E501
130133
'project': 'project', # noqa: E501
131134
'name': 'name', # noqa: E501
132135
'file': 'file', # noqa: E501
@@ -137,14 +140,14 @@ def discriminator():
137140
'ifc_id': 'ifc_id', # noqa: E501
138141
'user_permission': 'user_permission', # noqa: E501
139142
'parent_id': 'parent_id', # noqa: E501
140-
'creator': 'creator', # noqa: E501
141143
'file_name': 'file_name', # noqa: E501
142144
'description': 'description', # noqa: E501
143145
'size': 'size', # noqa: E501
144146
}
145147

146148
read_only_vars = {
147149
'id', # noqa: E501
150+
'created_by', # noqa: E501
148151
'project', # noqa: E501
149152
'tags', # noqa: E501
150153
'created_at', # noqa: E501
@@ -158,11 +161,12 @@ def discriminator():
158161

159162
@classmethod
160163
@convert_js_args_to_python_args
161-
def _from_openapi_data(cls, id, project, name, file, tags, created_at, updated_at, model_id, ifc_id, user_permission, *args, **kwargs): # noqa: E501
164+
def _from_openapi_data(cls, id, created_by, project, name, file, tags, created_at, updated_at, model_id, ifc_id, user_permission, *args, **kwargs): # noqa: E501
162165
"""Document - a model defined in OpenAPI
163166
164167
Args:
165168
id (int):
169+
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
166170
project (int):
167171
name (str): Shown name of the file
168172
file (str):
@@ -205,7 +209,6 @@ def _from_openapi_data(cls, id, project, name, file, tags, created_at, updated_a
205209
through its discriminator because we passed in
206210
_visited_composed_classes = (Animal,)
207211
parent_id (int, none_type): [optional] # noqa: E501
208-
creator (int, none_type): [optional] # noqa: E501
209212
file_name (str): Full name of the file. [optional] # noqa: E501
210213
description (str, none_type): Description of the file. [optional] # noqa: E501
211214
size (int, none_type): Size of the file.. [optional] # noqa: E501
@@ -237,6 +240,7 @@ def _from_openapi_data(cls, id, project, name, file, tags, created_at, updated_a
237240
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
238241

239242
self.id = id
243+
self.created_by = created_by
240244
self.project = project
241245
self.name = name
242246
self.file = file
@@ -303,7 +307,6 @@ def __init__(self, name, file, *args, **kwargs): # noqa: E501
303307
through its discriminator because we passed in
304308
_visited_composed_classes = (Animal,)
305309
parent_id (int, none_type): [optional] # noqa: E501
306-
creator (int, none_type): [optional] # noqa: E501
307310
file_name (str): Full name of the file. [optional] # noqa: E501
308311
description (str, none_type): Description of the file. [optional] # noqa: E501
309312
size (int, none_type): Size of the file.. [optional] # noqa: E501

bimdata_api_client/model/patched_document_request.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def openapi_types():
109109
"""
110110
return {
111111
'parent_id': (int, none_type,), # noqa: E501
112-
'creator': (int, none_type,), # noqa: E501
113112
'name': (str,), # noqa: E501
114113
'file_name': (str,), # noqa: E501
115114
'description': (str, none_type,), # noqa: E501
@@ -127,7 +126,6 @@ def discriminator():
127126

128127
attribute_map = {
129128
'parent_id': 'parent_id', # noqa: E501
130-
'creator': 'creator', # noqa: E501
131129
'name': 'name', # noqa: E501
132130
'file_name': 'file_name', # noqa: E501
133131
'description': 'description', # noqa: E501
@@ -180,7 +178,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
180178
through its discriminator because we passed in
181179
_visited_composed_classes = (Animal,)
182180
parent_id (int, none_type): [optional] # noqa: E501
183-
creator (int, none_type): [optional] # noqa: E501
184181
name (str): Shown name of the file. [optional] # noqa: E501
185182
file_name (str): Full name of the file. [optional] # noqa: E501
186183
description (str, none_type): Description of the file. [optional] # noqa: E501
@@ -271,7 +268,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
271268
through its discriminator because we passed in
272269
_visited_composed_classes = (Animal,)
273270
parent_id (int, none_type): [optional] # noqa: E501
274-
creator (int, none_type): [optional] # noqa: E501
275271
name (str): Shown name of the file. [optional] # noqa: E501
276272
file_name (str): Full name of the file. [optional] # noqa: E501
277273
description (str, none_type): Description of the file. [optional] # noqa: E501

docs/CollaborationApi.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,6 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
13641364
name = "name_example" # str | Shown name of the file
13651365
file = open('/path/to/file', 'rb') # file_type |
13661366
parent_id = 1 # int, none_type | (optional)
1367-
creator = 1 # int, none_type | (optional)
13681367
file_name = "file_name_example" # str | Full name of the file (optional)
13691368
description = "description_example" # str, none_type | Description of the file (optional)
13701369
size = 0 # int, none_type | Size of the file. (optional)
@@ -1384,7 +1383,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
13841383
# and optional values
13851384
try:
13861385
# Create a document
1387-
api_response = api_instance.create_document(cloud_pk, project_pk, name, file, parent_id=parent_id, creator=creator, file_name=file_name, description=description, size=size, model_source=model_source, ifc_source=ifc_source, successor_of=successor_of)
1386+
api_response = api_instance.create_document(cloud_pk, project_pk, name, file, parent_id=parent_id, file_name=file_name, description=description, size=size, model_source=model_source, ifc_source=ifc_source, successor_of=successor_of)
13881387
pprint(api_response)
13891388
except bimdata_api_client.ApiException as e:
13901389
print("Exception when calling CollaborationApi->create_document: %s\n" % e)
@@ -1400,7 +1399,6 @@ Name | Type | Description | Notes
14001399
**name** | **str**| Shown name of the file |
14011400
**file** | **file_type**| |
14021401
**parent_id** | **int, none_type**| | [optional]
1403-
**creator** | **int, none_type**| | [optional]
14041402
**file_name** | **str**| Full name of the file | [optional]
14051403
**description** | **str, none_type**| Description of the file | [optional]
14061404
**size** | **int, none_type**| Size of the file. | [optional]
@@ -9813,7 +9811,6 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
98139811
project_pk = 1 # int | A unique integer value identifying this project.
98149812
patched_document_request = PatchedDocumentRequest(
98159813
parent_id=1,
9816-
creator=1,
98179814
name="name_example",
98189815
file_name="file_name_example",
98199816
description="description_example",

docs/Document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **int** | | [readonly]
8+
**created_by** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
89
**project** | **int** | | [readonly]
910
**name** | **str** | Shown name of the file |
1011
**file** | **str** | |
@@ -15,7 +16,6 @@ Name | Type | Description | Notes
1516
**ifc_id** | **int, none_type** | DEPRECATED: Use 'model_id' instead. | [readonly]
1617
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
1718
**parent_id** | **int, none_type** | | [optional]
18-
**creator** | **int, none_type** | | [optional]
1919
**file_name** | **str** | Full name of the file | [optional]
2020
**description** | **str, none_type** | Description of the file | [optional]
2121
**size** | **int, none_type** | Size of the file. | [optional]

docs/PatchedDocumentRequest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**parent_id** | **int, none_type** | | [optional]
8-
**creator** | **int, none_type** | | [optional]
98
**name** | **str** | Shown name of the file | [optional]
109
**file_name** | **str** | Full name of the file | [optional]
1110
**description** | **str, none_type** | Description of the file | [optional]

test/test_document.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
import bimdata_api_client
1616
from bimdata_api_client.model.tag import Tag
17+
from bimdata_api_client.model.user import User
1718
globals()['Tag'] = Tag
19+
globals()['User'] = User
1820
from bimdata_api_client.model.document import Document
1921

2022

0 commit comments

Comments
 (0)