1616import re # noqa: F401
1717import json
1818
19- from pydantic import BaseModel , ConfigDict , StrictInt , StrictStr
20- from typing import Any , ClassVar , Dict , List
19+ from pydantic import BaseModel , ConfigDict , StrictBool , StrictInt , StrictStr
20+ from typing import Any , ClassVar , Dict , List , Optional
2121from typing import Optional , Set
2222from typing_extensions import Self
2323
@@ -28,7 +28,8 @@ class FunctionBoundary(BaseModel):
2828 mangled_name : StrictStr
2929 start_address : StrictInt
3030 end_address : StrictInt
31- __properties : ClassVar [List [str ]] = ["mangled_name" , "start_address" , "end_address" ]
31+ include_in_analysis : Optional [StrictBool ] = None
32+ __properties : ClassVar [List [str ]] = ["mangled_name" , "start_address" , "end_address" , "include_in_analysis" ]
3233
3334 model_config = ConfigDict (
3435 populate_by_name = True ,
@@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]:
6970 exclude = excluded_fields ,
7071 exclude_none = True ,
7172 )
73+ # set to None if include_in_analysis (nullable) is None
74+ # and model_fields_set contains the field
75+ if self .include_in_analysis is None and "include_in_analysis" in self .model_fields_set :
76+ _dict ['include_in_analysis' ] = None
77+
7278 return _dict
7379
7480 @classmethod
@@ -83,7 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8389 _obj = cls .model_validate ({
8490 "mangled_name" : obj .get ("mangled_name" ),
8591 "start_address" : obj .get ("start_address" ),
86- "end_address" : obj .get ("end_address" )
92+ "end_address" : obj .get ("end_address" ),
93+ "include_in_analysis" : obj .get ("include_in_analysis" )
8794 })
8895 return _obj
8996
0 commit comments