Skip to content

Commit 213c4d7

Browse files
committed
PATCH: visa serialization in document (#522)
* visa serialization in document * no prefetch tag
1 parent fec719b commit 213c4d7

File tree

10 files changed

+22
-12
lines changed

10 files changed

+22
-12
lines changed

bimdata_api_client/model/document.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
def lazy_import():
3434
from bimdata_api_client.model.tag import Tag
3535
from bimdata_api_client.model.user import User
36+
from bimdata_api_client.model.visa import Visa
3637
globals()['Tag'] = Tag
3738
globals()['User'] = User
39+
globals()['Visa'] = Visa
3840

3941

4042
class Document(ModelNormal):
@@ -125,6 +127,7 @@ def openapi_types():
125127
'name': (str,), # noqa: E501
126128
'file': (str,), # noqa: E501
127129
'tags': ([Tag],), # noqa: E501
130+
'visas': ([Visa],), # noqa: E501
128131
'created_at': (datetime,), # noqa: E501
129132
'updated_at': (datetime,), # noqa: E501
130133
'model_id': (int, none_type,), # noqa: E501
@@ -149,6 +152,7 @@ def discriminator():
149152
'name': 'name', # noqa: E501
150153
'file': 'file', # noqa: E501
151154
'tags': 'tags', # noqa: E501
155+
'visas': 'visas', # noqa: E501
152156
'created_at': 'created_at', # noqa: E501
153157
'updated_at': 'updated_at', # noqa: E501
154158
'model_id': 'model_id', # noqa: E501
@@ -166,6 +170,7 @@ def discriminator():
166170
'created_by', # noqa: E501
167171
'project', # noqa: E501
168172
'tags', # noqa: E501
173+
'visas', # noqa: E501
169174
'created_at', # noqa: E501
170175
'updated_at', # noqa: E501
171176
'model_id', # noqa: E501
@@ -178,7 +183,7 @@ def discriminator():
178183

179184
@classmethod
180185
@convert_js_args_to_python_args
181-
def _from_openapi_data(cls, id, created_by, project, name, file, tags, created_at, updated_at, model_id, model_type, ifc_id, user_permission, *args, **kwargs): # noqa: E501
186+
def _from_openapi_data(cls, id, created_by, project, name, file, tags, visas, created_at, updated_at, model_id, model_type, ifc_id, user_permission, *args, **kwargs): # noqa: E501
182187
"""Document - a model defined in OpenAPI
183188
184189
Args:
@@ -188,6 +193,7 @@ def _from_openapi_data(cls, id, created_by, project, name, file, tags, created_a
188193
name (str): Shown name of the file
189194
file (str):
190195
tags ([Tag]):
196+
visas ([Visa]):
191197
created_at (datetime): Creation date
192198
updated_at (datetime): Date of the last update
193199
model_id (int, none_type):
@@ -263,6 +269,7 @@ def _from_openapi_data(cls, id, created_by, project, name, file, tags, created_a
263269
self.name = name
264270
self.file = file
265271
self.tags = tags
272+
self.visas = visas
266273
self.created_at = created_at
267274
self.updated_at = updated_at
268275
self.model_id = model_id

bimdata_api_client/model/marketplace_app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def openapi_types():
122122
'is_public': (bool,), # noqa: E501
123123
'tags': ([str],), # noqa: E501
124124
'logo': (str, none_type,), # noqa: E501
125+
'file': (str, none_type,), # noqa: E501
125126
}
126127

127128
@cached_property
@@ -145,6 +146,7 @@ def discriminator():
145146
'is_public': 'is_public', # noqa: E501
146147
'tags': 'tags', # noqa: E501
147148
'logo': 'logo', # noqa: E501
149+
'file': 'file', # noqa: E501
148150
}
149151

150152
read_only_vars = {
@@ -210,6 +212,7 @@ def _from_openapi_data(cls, id, name, short_description, long_description, creat
210212
is_public (bool): [optional] # noqa: E501
211213
tags ([str]): [optional] # noqa: E501
212214
logo (str, none_type): [optional] # noqa: E501
215+
file (str, none_type): [optional] # noqa: E501
213216
"""
214217

215218
_check_type = kwargs.pop('_check_type', True)
@@ -309,6 +312,7 @@ def __init__(self, name, short_description, long_description, *args, **kwargs):
309312
is_public (bool): [optional] # noqa: E501
310313
tags ([str]): [optional] # noqa: E501
311314
logo (str, none_type): [optional] # noqa: E501
315+
file (str, none_type): [optional] # noqa: E501
312316
"""
313317

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

bimdata_api_client/model/marketplace_app_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def openapi_types():
116116
'is_public': (bool,), # noqa: E501
117117
'tags': ([str],), # noqa: E501
118118
'logo': (file_type, none_type,), # noqa: E501
119+
'file': (file_type, none_type,), # noqa: E501
119120
}
120121

121122
@cached_property
@@ -135,6 +136,7 @@ def discriminator():
135136
'is_public': 'is_public', # noqa: E501
136137
'tags': 'tags', # noqa: E501
137138
'logo': 'logo', # noqa: E501
139+
'file': 'file', # noqa: E501
138140
}
139141

140142
read_only_vars = {
@@ -191,6 +193,7 @@ def _from_openapi_data(cls, name, short_description, long_description, *args, **
191193
is_public (bool): [optional] # noqa: E501
192194
tags ([str]): [optional] # noqa: E501
193195
logo (file_type, none_type): [optional] # noqa: E501
196+
file (file_type, none_type): [optional] # noqa: E501
194197
"""
195198

196199
_check_type = kwargs.pop('_check_type', True)
@@ -288,6 +291,7 @@ def __init__(self, name, short_description, long_description, *args, **kwargs):
288291
is_public (bool): [optional] # noqa: E501
289292
tags ([str]): [optional] # noqa: E501
290293
logo (file_type, none_type): [optional] # noqa: E501
294+
file (file_type, none_type): [optional] # noqa: E501
291295
"""
292296

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

bimdata_api_client/model/visa.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131

3232

3333
def lazy_import():
34-
from bimdata_api_client.model.document import Document
3534
from bimdata_api_client.model.user_project import UserProject
3635
from bimdata_api_client.model.visa_comment import VisaComment
3736
from bimdata_api_client.model.visa_validation import VisaValidation
38-
globals()['Document'] = Document
3937
globals()['UserProject'] = UserProject
4038
globals()['VisaComment'] = VisaComment
4139
globals()['VisaValidation'] = VisaValidation
@@ -104,7 +102,6 @@ def openapi_types():
104102
'validations_in_error': ([int],), # noqa: E501
105103
'creator': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
106104
'status': (str,), # noqa: E501
107-
'document': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
108105
'comments': ([VisaComment],), # noqa: E501
109106
'created_at': (datetime,), # noqa: E501
110107
'updated_at': (datetime,), # noqa: E501
@@ -123,7 +120,6 @@ def discriminator():
123120
'validations_in_error': 'validations_in_error', # noqa: E501
124121
'creator': 'creator', # noqa: E501
125122
'status': 'status', # noqa: E501
126-
'document': 'document', # noqa: E501
127123
'comments': 'comments', # noqa: E501
128124
'created_at': 'created_at', # noqa: E501
129125
'updated_at': 'updated_at', # noqa: E501
@@ -137,7 +133,6 @@ def discriminator():
137133
'validations_in_error', # noqa: E501
138134
'creator', # noqa: E501
139135
'status', # noqa: E501
140-
'document', # noqa: E501
141136
'comments', # noqa: E501
142137
'created_at', # noqa: E501
143138
'updated_at', # noqa: E501
@@ -147,7 +142,7 @@ def discriminator():
147142

148143
@classmethod
149144
@convert_js_args_to_python_args
150-
def _from_openapi_data(cls, id, validations, validations_in_error, creator, status, document, comments, created_at, updated_at, *args, **kwargs): # noqa: E501
145+
def _from_openapi_data(cls, id, validations, validations_in_error, creator, status, comments, created_at, updated_at, *args, **kwargs): # noqa: E501
151146
"""Visa - a model defined in OpenAPI
152147
153148
Args:
@@ -156,7 +151,6 @@ def _from_openapi_data(cls, id, validations, validations_in_error, creator, stat
156151
validations_in_error ([int]): Validation IDs where one or more validators have no longer access to the visa document.
157152
creator (bool, date, datetime, dict, float, int, list, str, none_type):
158153
status (str):
159-
document (bool, date, datetime, dict, float, int, list, str, none_type):
160154
comments ([VisaComment]):
161155
created_at (datetime):
162156
updated_at (datetime):
@@ -226,7 +220,6 @@ def _from_openapi_data(cls, id, validations, validations_in_error, creator, stat
226220
self.validations_in_error = validations_in_error
227221
self.creator = creator
228222
self.status = status
229-
self.document = document
230223
self.comments = comments
231224
self.created_at = created_at
232225
self.updated_at = updated_at

docs/Document.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**name** | **str** | Shown name of the file |
1111
**file** | **str** | |
1212
**tags** | [**[Tag]**](Tag.md) | | [readonly]
13+
**visas** | [**[Visa]**](Visa.md) | | [readonly]
1314
**created_at** | **datetime** | Creation date | [readonly]
1415
**updated_at** | **datetime** | Date of the last update | [readonly]
1516
**model_id** | **int, none_type** | | [readonly]

docs/MarketplaceApp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**is_public** | **bool** | | [optional]
2020
**tags** | **[str]** | | [optional]
2121
**logo** | **str, none_type** | | [optional]
22+
**file** | **str, none_type** | | [optional]
2223
**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]
2324

2425
[[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/MarketplaceAppRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**is_public** | **bool** | | [optional]
1616
**tags** | **[str]** | | [optional]
1717
**logo** | **file_type, none_type** | | [optional]
18+
**file** | **file_type, none_type** | | [optional]
1819
**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]
1920

2021
[[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/Visa.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Name | Type | Description | Notes
99
**validations_in_error** | **[int]** | Validation IDs where one or more validators have no longer access to the visa document. | [readonly]
1010
**creator** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
1111
**status** | **str** | | [readonly]
12-
**document** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
1312
**comments** | [**[VisaComment]**](VisaComment.md) | | [readonly]
1413
**created_at** | **datetime** | | [readonly]
1514
**updated_at** | **datetime** | | [readonly]

test/test_document.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
import bimdata_api_client
1616
from bimdata_api_client.model.tag import Tag
1717
from bimdata_api_client.model.user import User
18+
from bimdata_api_client.model.visa import Visa
1819
globals()['Tag'] = Tag
1920
globals()['User'] = User
21+
globals()['Visa'] = Visa
2022
from bimdata_api_client.model.document import Document
2123

2224

test/test_visa.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
import unittest
1414

1515
import bimdata_api_client
16-
from bimdata_api_client.model.document import Document
1716
from bimdata_api_client.model.user_project import UserProject
1817
from bimdata_api_client.model.visa_comment import VisaComment
1918
from bimdata_api_client.model.visa_validation import VisaValidation
20-
globals()['Document'] = Document
2119
globals()['UserProject'] = UserProject
2220
globals()['VisaComment'] = VisaComment
2321
globals()['VisaValidation'] = VisaValidation

0 commit comments

Comments
 (0)