5
5
from grader_labextension .api .models .base_model import Model
6
6
from grader_labextension .api import util
7
7
8
+ from grader_labextension .api .models .auto_status import AutoStatus # noqa: E501
9
+ from grader_labextension .api .models .feedback_status import FeedbackStatus # noqa: E501
10
+ from grader_labextension .api .models .manual_status import ManualStatus # noqa: E501
11
+
8
12
9
13
class Submission (Model ):
10
14
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
15
12
16
Do not edit the class manually.
13
17
"""
14
18
15
- def __init__ (self , id = None , submitted_at = None , auto_status = None , manual_status = None , username = None , user_display_name = None , grading_score = None , score_scaling = None , score = None , assignid = None , commit_hash = None , feedback_status = None , edited = None ): # noqa: E501
19
+ def __init__ (
20
+ self ,
21
+ id = None ,
22
+ submitted_at = None ,
23
+ auto_status = None ,
24
+ manual_status = None ,
25
+ username = None ,
26
+ user_display_name = None ,
27
+ grading_score = None ,
28
+ score_scaling = None ,
29
+ score = None ,
30
+ assignid = None ,
31
+ commit_hash = None ,
32
+ feedback_status = None ,
33
+ edited = None ,
34
+ ): # noqa: E501
16
35
"""Submission - a model defined in OpenAPI
17
36
18
37
:param id: The id of this Submission. # noqa: E501
19
38
:type id: int
20
39
:param submitted_at: The submitted_at of this Submission. # noqa: E501
21
40
:type submitted_at: datetime
22
41
:param auto_status: The auto_status of this Submission. # noqa: E501
23
- :type auto_status: str
42
+ :type auto_status: AutoStatus
24
43
:param manual_status: The manual_status of this Submission. # noqa: E501
25
- :type manual_status: str
44
+ :type manual_status: ManualStatus
26
45
:param username: The username of this Submission. # noqa: E501
27
46
:type username: str
28
47
:param user_display_name: The user_display_name of this Submission. # noqa: E501
@@ -38,40 +57,40 @@ def __init__(self, id=None, submitted_at=None, auto_status=None, manual_status=N
38
57
:param commit_hash: The commit_hash of this Submission. # noqa: E501
39
58
:type commit_hash: str
40
59
:param feedback_status: The feedback_status of this Submission. # noqa: E501
41
- :type feedback_status: str
60
+ :type feedback_status: FeedbackStatus
42
61
:param edited: The edited of this Submission. # noqa: E501
43
62
:type edited: bool
44
63
"""
45
64
self .openapi_types = {
46
- 'id' : int ,
47
- ' submitted_at' : datetime ,
48
- ' auto_status' : str ,
49
- ' manual_status' : str ,
50
- ' username' : str ,
51
- ' user_display_name' : str ,
52
- ' grading_score' : float ,
53
- ' score_scaling' : float ,
54
- ' score' : float ,
55
- ' assignid' : int ,
56
- ' commit_hash' : str ,
57
- ' feedback_status' : str ,
58
- ' edited' : bool
65
+ "id" : int ,
66
+ " submitted_at" : datetime ,
67
+ " auto_status" : AutoStatus ,
68
+ " manual_status" : ManualStatus ,
69
+ " username" : str ,
70
+ " user_display_name" : str ,
71
+ " grading_score" : float ,
72
+ " score_scaling" : float ,
73
+ " score" : float ,
74
+ " assignid" : int ,
75
+ " commit_hash" : str ,
76
+ " feedback_status" : FeedbackStatus ,
77
+ " edited" : bool ,
59
78
}
60
79
61
80
self .attribute_map = {
62
- 'id' : 'id' ,
63
- ' submitted_at' : ' submitted_at' ,
64
- ' auto_status' : ' auto_status' ,
65
- ' manual_status' : ' manual_status' ,
66
- ' username' : ' username' ,
67
- ' user_display_name' : ' user_display_name' ,
68
- ' grading_score' : ' grading_score' ,
69
- ' score_scaling' : ' score_scaling' ,
70
- ' score' : ' score' ,
71
- ' assignid' : ' assignid' ,
72
- ' commit_hash' : ' commit_hash' ,
73
- ' feedback_status' : ' feedback_status' ,
74
- ' edited' : ' edited'
81
+ "id" : "id" ,
82
+ " submitted_at" : " submitted_at" ,
83
+ " auto_status" : " auto_status" ,
84
+ " manual_status" : " manual_status" ,
85
+ " username" : " username" ,
86
+ " user_display_name" : " user_display_name" ,
87
+ " grading_score" : " grading_score" ,
88
+ " score_scaling" : " score_scaling" ,
89
+ " score" : " score" ,
90
+ " assignid" : " assignid" ,
91
+ " commit_hash" : " commit_hash" ,
92
+ " feedback_status" : " feedback_status" ,
93
+ " edited" : " edited" ,
75
94
}
76
95
77
96
self ._id = id
@@ -89,7 +108,7 @@ def __init__(self, id=None, submitted_at=None, auto_status=None, manual_status=N
89
108
self ._edited = edited
90
109
91
110
@classmethod
92
- def from_dict (cls , dikt ) -> ' Submission' :
111
+ def from_dict (cls , dikt ) -> " Submission" :
93
112
"""Returns the dict as a model
94
113
95
114
:param dikt: A dict.
@@ -142,56 +161,44 @@ def submitted_at(self, submitted_at: datetime):
142
161
self ._submitted_at = submitted_at
143
162
144
163
@property
145
- def auto_status (self ) -> str :
164
+ def auto_status (self ) -> AutoStatus :
146
165
"""Gets the auto_status of this Submission.
147
166
148
167
149
168
:return: The auto_status of this Submission.
150
- :rtype: str
169
+ :rtype: AutoStatus
151
170
"""
152
171
return self ._auto_status
153
172
154
173
@auto_status .setter
155
- def auto_status (self , auto_status : str ):
174
+ def auto_status (self , auto_status : AutoStatus ):
156
175
"""Sets the auto_status of this Submission.
157
176
158
177
159
178
:param auto_status: The auto_status of this Submission.
160
- :type auto_status: str
179
+ :type auto_status: AutoStatus
161
180
"""
162
- allowed_values = ["not_graded" , "pending" , "automatically_graded" , "grading_failed" ] # noqa: E501
163
- if auto_status not in allowed_values :
164
- raise ValueError (
165
- "Invalid value for `auto_status` ({0}), must be one of {1}"
166
- .format (auto_status , allowed_values )
167
- )
168
181
169
182
self ._auto_status = auto_status
170
183
171
184
@property
172
- def manual_status (self ) -> str :
185
+ def manual_status (self ) -> ManualStatus :
173
186
"""Gets the manual_status of this Submission.
174
187
175
188
176
189
:return: The manual_status of this Submission.
177
- :rtype: str
190
+ :rtype: ManualStatus
178
191
"""
179
192
return self ._manual_status
180
193
181
194
@manual_status .setter
182
- def manual_status (self , manual_status : str ):
195
+ def manual_status (self , manual_status : ManualStatus ):
183
196
"""Sets the manual_status of this Submission.
184
197
185
198
186
199
:param manual_status: The manual_status of this Submission.
187
- :type manual_status: str
200
+ :type manual_status: ManualStatus
188
201
"""
189
- allowed_values = ["not_graded" , "manually_graded" , "being_edited" , "grading_failed" ] # noqa: E501
190
- if manual_status not in allowed_values :
191
- raise ValueError (
192
- "Invalid value for `manual_status` ({0}), must be one of {1}"
193
- .format (manual_status , allowed_values )
194
- )
195
202
196
203
self ._manual_status = manual_status
197
204
@@ -277,9 +284,13 @@ def score_scaling(self, score_scaling: float):
277
284
:type score_scaling: float
278
285
"""
279
286
if score_scaling is not None and score_scaling > 1.0 : # noqa: E501
280
- raise ValueError ("Invalid value for `score_scaling`, must be a value less than or equal to `1.0`" ) # noqa: E501
287
+ raise ValueError (
288
+ "Invalid value for `score_scaling`, must be a value less than or equal to `1.0`"
289
+ ) # noqa: E501
281
290
if score_scaling is not None and score_scaling < 0.0 : # noqa: E501
282
- raise ValueError ("Invalid value for `score_scaling`, must be a value greater than or equal to `0.0`" ) # noqa: E501
291
+ raise ValueError (
292
+ "Invalid value for `score_scaling`, must be a value greater than or equal to `0.0`"
293
+ ) # noqa: E501
283
294
284
295
self ._score_scaling = score_scaling
285
296
@@ -347,29 +358,23 @@ def commit_hash(self, commit_hash: str):
347
358
self ._commit_hash = commit_hash
348
359
349
360
@property
350
- def feedback_status (self ) -> str :
361
+ def feedback_status (self ) -> FeedbackStatus :
351
362
"""Gets the feedback_status of this Submission.
352
363
353
364
354
365
:return: The feedback_status of this Submission.
355
- :rtype: str
366
+ :rtype: FeedbackStatus
356
367
"""
357
368
return self ._feedback_status
358
369
359
370
@feedback_status .setter
360
- def feedback_status (self , feedback_status : str ):
371
+ def feedback_status (self , feedback_status : FeedbackStatus ):
361
372
"""Sets the feedback_status of this Submission.
362
373
363
374
364
375
:param feedback_status: The feedback_status of this Submission.
365
- :type feedback_status: str
376
+ :type feedback_status: FeedbackStatus
366
377
"""
367
- allowed_values = ["not_generated" , "generating" , "generated" , "generation_failed" , "feedback_outdated" ] # noqa: E501
368
- if feedback_status not in allowed_values :
369
- raise ValueError (
370
- "Invalid value for `feedback_status` ({0}), must be one of {1}"
371
- .format (feedback_status , allowed_values )
372
- )
373
378
374
379
self ._feedback_status = feedback_status
375
380
0 commit comments