Skip to content

Commit 7504aee

Browse files
committed
PATCH: add document to visa serializer (#458)
1 parent 67972ec commit 7504aee

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

bimdata_api_client/models/visa.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Visa(object):
4040
'creator_id': 'int',
4141
'status': 'str',
4242
'description': 'str',
43+
'document': 'Document',
4344
'comments': 'list[VisaComment]',
4445
'deadline': 'date',
4546
'created_at': 'datetime',
@@ -53,13 +54,14 @@ class Visa(object):
5354
'creator_id': 'creator_id',
5455
'status': 'status',
5556
'description': 'description',
57+
'document': 'document',
5658
'comments': 'comments',
5759
'deadline': 'deadline',
5860
'created_at': 'created_at',
5961
'updated_at': 'updated_at'
6062
}
6163

62-
def __init__(self, id=None, validations=None, creator=None, creator_id=None, status=None, description=None, comments=None, deadline=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501
64+
def __init__(self, id=None, validations=None, creator=None, creator_id=None, status=None, description=None, document=None, comments=None, deadline=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501
6365
"""Visa - a model defined in OpenAPI""" # noqa: E501
6466
if local_vars_configuration is None:
6567
local_vars_configuration = Configuration()
@@ -71,6 +73,7 @@ def __init__(self, id=None, validations=None, creator=None, creator_id=None, sta
7173
self._creator_id = None
7274
self._status = None
7375
self._description = None
76+
self._document = None
7477
self._comments = None
7578
self._deadline = None
7679
self._created_at = None
@@ -88,6 +91,8 @@ def __init__(self, id=None, validations=None, creator=None, creator_id=None, sta
8891
if status is not None:
8992
self.status = status
9093
self.description = description
94+
if document is not None:
95+
self.document = document
9196
if comments is not None:
9297
self.comments = comments
9398
self.deadline = deadline
@@ -232,6 +237,27 @@ def description(self, description):
232237

233238
self._description = description
234239

240+
@property
241+
def document(self):
242+
"""Gets the document of this Visa. # noqa: E501
243+
244+
245+
:return: The document of this Visa. # noqa: E501
246+
:rtype: Document
247+
"""
248+
return self._document
249+
250+
@document.setter
251+
def document(self, document):
252+
"""Sets the document of this Visa.
253+
254+
255+
:param document: The document of this Visa. # noqa: E501
256+
:type: Document
257+
"""
258+
259+
self._document = document
260+
235261
@property
236262
def comments(self):
237263
"""Gets the comments of this Visa. # noqa: E501

docs/Visa.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**creator_id** | **int** | This is the userproject_id. This field is only used if the call is made from an App | [optional]
1010
**status** | **str** | | [optional] [readonly]
1111
**description** | **str** | Description of the visa | [optional]
12+
**document** | [**Document**](Document.md) | | [optional]
1213
**comments** | [**list[VisaComment]**](VisaComment.md) | | [optional] [readonly]
1314
**deadline** | **date** | | [optional]
1415
**created_at** | **datetime** | | [optional] [readonly]

test/test_visa.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ def make_instance(self, include_optional):
6969
creator_id = 56,
7070
status = 'O',
7171
description = '0',
72+
document = bimdata_api_client.models.document.Document(
73+
id = 56,
74+
parent = 56,
75+
parent_id = 56,
76+
creator = 56,
77+
project = 56,
78+
name = '0',
79+
file_name = '0',
80+
description = '0',
81+
file = '0',
82+
size = 0,
83+
created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
84+
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
85+
ifc_source = 'UPLOAD',
86+
ifc_id = '0',
87+
user_permission = 56, ),
7288
comments = [
7389
bimdata_api_client.models.visa_comment.VisaComment(
7490
id = 56,

0 commit comments

Comments
 (0)