@@ -44,11 +44,11 @@ class Task(BaseModel):
4444 rel_obj_model : StrictStr
4545 rel_obj_id : Optional [StrictStr ] = None
4646 uid : StrictStr
47- messages : List [LogEvent ]
48- previous_messages : List [LogEvent ]
47+ logs : List [LogEvent ]
48+ previous_logs : List [LogEvent ]
4949 aggregated_status : TaskAggregatedStatusEnum
5050 description : Optional [StrictStr ]
51- __properties : ClassVar [List [str ]] = ["message_id" , "queue_name" , "actor_name" , "state" , "mtime" , "retries" , "eta" , "rel_obj_app_label" , "rel_obj_model" , "rel_obj_id" , "uid" , "messages " , "previous_messages " , "aggregated_status" , "description" ]
51+ __properties : ClassVar [List [str ]] = ["message_id" , "queue_name" , "actor_name" , "state" , "mtime" , "retries" , "eta" , "rel_obj_app_label" , "rel_obj_model" , "rel_obj_id" , "uid" , "logs " , "previous_logs " , "aggregated_status" , "description" ]
5252
5353 model_config = ConfigDict (
5454 populate_by_name = True ,
@@ -84,11 +84,15 @@ def to_dict(self) -> Dict[str, Any]:
8484 * OpenAPI `readOnly` fields are excluded.
8585 * OpenAPI `readOnly` fields are excluded.
8686 * OpenAPI `readOnly` fields are excluded.
87+ * OpenAPI `readOnly` fields are excluded.
88+ * OpenAPI `readOnly` fields are excluded.
8789 """
8890 excluded_fields : Set [str ] = set ([
8991 "rel_obj_app_label" ,
9092 "rel_obj_model" ,
9193 "uid" ,
94+ "logs" ,
95+ "previous_logs" ,
9296 "description" ,
9397 ])
9498
@@ -97,20 +101,20 @@ def to_dict(self) -> Dict[str, Any]:
97101 exclude = excluded_fields ,
98102 exclude_none = True ,
99103 )
100- # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
104+ # override the default output from pydantic by calling `to_dict()` of each item in logs (list)
101105 _items = []
102- if self .messages :
103- for _item_messages in self .messages :
104- if _item_messages :
105- _items .append (_item_messages .to_dict ())
106- _dict ['messages ' ] = _items
107- # override the default output from pydantic by calling `to_dict()` of each item in previous_messages (list)
106+ if self .logs :
107+ for _item_logs in self .logs :
108+ if _item_logs :
109+ _items .append (_item_logs .to_dict ())
110+ _dict ['logs ' ] = _items
111+ # override the default output from pydantic by calling `to_dict()` of each item in previous_logs (list)
108112 _items = []
109- if self .previous_messages :
110- for _item_previous_messages in self .previous_messages :
111- if _item_previous_messages :
112- _items .append (_item_previous_messages .to_dict ())
113- _dict ['previous_messages ' ] = _items
113+ if self .previous_logs :
114+ for _item_previous_logs in self .previous_logs :
115+ if _item_previous_logs :
116+ _items .append (_item_previous_logs .to_dict ())
117+ _dict ['previous_logs ' ] = _items
114118 # set to None if eta (nullable) is None
115119 # and model_fields_set contains the field
116120 if self .eta is None and "eta" in self .model_fields_set :
@@ -149,8 +153,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
149153 "rel_obj_model" : obj .get ("rel_obj_model" ),
150154 "rel_obj_id" : obj .get ("rel_obj_id" ),
151155 "uid" : obj .get ("uid" ),
152- "messages " : [LogEvent .from_dict (_item ) for _item in obj ["messages " ]] if obj .get ("messages " ) is not None else None ,
153- "previous_messages " : [LogEvent .from_dict (_item ) for _item in obj ["previous_messages " ]] if obj .get ("previous_messages " ) is not None else None ,
156+ "logs " : [LogEvent .from_dict (_item ) for _item in obj ["logs " ]] if obj .get ("logs " ) is not None else None ,
157+ "previous_logs " : [LogEvent .from_dict (_item ) for _item in obj ["previous_logs " ]] if obj .get ("previous_logs " ) is not None else None ,
154158 "aggregated_status" : obj .get ("aggregated_status" ),
155159 "description" : obj .get ("description" )
156160 })
0 commit comments