revengai 1.89.4__py3-none-any.whl → 1.91.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of revengai might be problematic. Click here for more details.

@@ -1,98 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
20
- from typing import Any, ClassVar, Dict, List, Union
21
- from typing import Optional, Set
22
- from typing_extensions import Self
23
-
24
- class AnalysisThreatScoreData(BaseModel):
25
- """
26
- AnalysisThreatScoreData
27
- """ # noqa: E501
28
- min: Union[StrictFloat, StrictInt] = Field(description="The minimum value for the analysis score")
29
- max: Union[StrictFloat, StrictInt] = Field(description="The maximum value for the analysis score")
30
- average: Union[StrictFloat, StrictInt] = Field(description="The average value for the analysis score")
31
- upper: Union[StrictFloat, StrictInt] = Field(description="The upper limit for the analysis score")
32
- lower: Union[StrictFloat, StrictInt] = Field(description="The lower limit for the analysis score")
33
- malware_count: StrictInt = Field(description="Number of malware binaries used in threat score calculation")
34
- benign_count: StrictInt = Field(description="Number of benign binaries used in threat score calculation")
35
- __properties: ClassVar[List[str]] = ["min", "max", "average", "upper", "lower", "malware_count", "benign_count"]
36
-
37
- model_config = ConfigDict(
38
- populate_by_name=True,
39
- validate_assignment=True,
40
- protected_namespaces=(),
41
- )
42
-
43
-
44
- def to_str(self) -> str:
45
- """Returns the string representation of the model using alias"""
46
- return pprint.pformat(self.model_dump(by_alias=True))
47
-
48
- def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
-
53
- @classmethod
54
- def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of AnalysisThreatScoreData from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- return _dict
77
-
78
- @classmethod
79
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of AnalysisThreatScoreData from a dict"""
81
- if obj is None:
82
- return None
83
-
84
- if not isinstance(obj, dict):
85
- return cls.model_validate(obj)
86
-
87
- _obj = cls.model_validate({
88
- "min": obj.get("min"),
89
- "max": obj.get("max"),
90
- "average": obj.get("average"),
91
- "upper": obj.get("upper"),
92
- "lower": obj.get("lower"),
93
- "malware_count": obj.get("malware_count"),
94
- "benign_count": obj.get("benign_count")
95
- })
96
- return _obj
97
-
98
-
@@ -1,125 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData
22
- from revengai.models.error_model import ErrorModel
23
- from revengai.models.meta_model import MetaModel
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseResponseAnalysisThreatScoreData(BaseModel):
28
- """
29
- BaseResponseAnalysisThreatScoreData
30
- """ # noqa: E501
31
- status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded")
32
- data: Optional[AnalysisThreatScoreData] = None
33
- message: Optional[StrictStr] = None
34
- errors: Optional[List[ErrorModel]] = None
35
- meta: Optional[MetaModel] = Field(default=None, description="Metadata")
36
- __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of BaseResponseAnalysisThreatScoreData from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- # override the default output from pydantic by calling `to_dict()` of data
78
- if self.data:
79
- _dict['data'] = self.data.to_dict()
80
- # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
81
- _items = []
82
- if self.errors:
83
- for _item_errors in self.errors:
84
- if _item_errors:
85
- _items.append(_item_errors.to_dict())
86
- _dict['errors'] = _items
87
- # override the default output from pydantic by calling `to_dict()` of meta
88
- if self.meta:
89
- _dict['meta'] = self.meta.to_dict()
90
- # set to None if data (nullable) is None
91
- # and model_fields_set contains the field
92
- if self.data is None and "data" in self.model_fields_set:
93
- _dict['data'] = None
94
-
95
- # set to None if message (nullable) is None
96
- # and model_fields_set contains the field
97
- if self.message is None and "message" in self.model_fields_set:
98
- _dict['message'] = None
99
-
100
- # set to None if errors (nullable) is None
101
- # and model_fields_set contains the field
102
- if self.errors is None and "errors" in self.model_fields_set:
103
- _dict['errors'] = None
104
-
105
- return _dict
106
-
107
- @classmethod
108
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109
- """Create an instance of BaseResponseAnalysisThreatScoreData from a dict"""
110
- if obj is None:
111
- return None
112
-
113
- if not isinstance(obj, dict):
114
- return cls.model_validate(obj)
115
-
116
- _obj = cls.model_validate({
117
- "status": obj.get("status") if obj.get("status") is not None else True,
118
- "data": AnalysisThreatScoreData.from_dict(obj["data"]) if obj.get("data") is not None else None,
119
- "message": obj.get("message"),
120
- "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
121
- "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None
122
- })
123
- return _obj
124
-
125
-
@@ -1,125 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from revengai.models.error_model import ErrorModel
22
- from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData
23
- from revengai.models.meta_model import MetaModel
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseResponseFunctionAnalysisThreatScoreData(BaseModel):
28
- """
29
- BaseResponseFunctionAnalysisThreatScoreData
30
- """ # noqa: E501
31
- status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded")
32
- data: Optional[FunctionAnalysisThreatScoreData] = None
33
- message: Optional[StrictStr] = None
34
- errors: Optional[List[ErrorModel]] = None
35
- meta: Optional[MetaModel] = Field(default=None, description="Metadata")
36
- __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of BaseResponseFunctionAnalysisThreatScoreData from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- # override the default output from pydantic by calling `to_dict()` of data
78
- if self.data:
79
- _dict['data'] = self.data.to_dict()
80
- # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
81
- _items = []
82
- if self.errors:
83
- for _item_errors in self.errors:
84
- if _item_errors:
85
- _items.append(_item_errors.to_dict())
86
- _dict['errors'] = _items
87
- # override the default output from pydantic by calling `to_dict()` of meta
88
- if self.meta:
89
- _dict['meta'] = self.meta.to_dict()
90
- # set to None if data (nullable) is None
91
- # and model_fields_set contains the field
92
- if self.data is None and "data" in self.model_fields_set:
93
- _dict['data'] = None
94
-
95
- # set to None if message (nullable) is None
96
- # and model_fields_set contains the field
97
- if self.message is None and "message" in self.model_fields_set:
98
- _dict['message'] = None
99
-
100
- # set to None if errors (nullable) is None
101
- # and model_fields_set contains the field
102
- if self.errors is None and "errors" in self.model_fields_set:
103
- _dict['errors'] = None
104
-
105
- return _dict
106
-
107
- @classmethod
108
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109
- """Create an instance of BaseResponseFunctionAnalysisThreatScoreData from a dict"""
110
- if obj is None:
111
- return None
112
-
113
- if not isinstance(obj, dict):
114
- return cls.model_validate(obj)
115
-
116
- _obj = cls.model_validate({
117
- "status": obj.get("status") if obj.get("status") is not None else True,
118
- "data": FunctionAnalysisThreatScoreData.from_dict(obj["data"]) if obj.get("data") is not None else None,
119
- "message": obj.get("message"),
120
- "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
121
- "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None
122
- })
123
- return _obj
124
-
125
-
@@ -1,125 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from revengai.models.error_model import ErrorModel
22
- from revengai.models.function_threat_score import FunctionThreatScore
23
- from revengai.models.meta_model import MetaModel
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseResponseFunctionThreatScore(BaseModel):
28
- """
29
- BaseResponseFunctionThreatScore
30
- """ # noqa: E501
31
- status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded")
32
- data: Optional[FunctionThreatScore] = None
33
- message: Optional[StrictStr] = None
34
- errors: Optional[List[ErrorModel]] = None
35
- meta: Optional[MetaModel] = Field(default=None, description="Metadata")
36
- __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of BaseResponseFunctionThreatScore from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- # override the default output from pydantic by calling `to_dict()` of data
78
- if self.data:
79
- _dict['data'] = self.data.to_dict()
80
- # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
81
- _items = []
82
- if self.errors:
83
- for _item_errors in self.errors:
84
- if _item_errors:
85
- _items.append(_item_errors.to_dict())
86
- _dict['errors'] = _items
87
- # override the default output from pydantic by calling `to_dict()` of meta
88
- if self.meta:
89
- _dict['meta'] = self.meta.to_dict()
90
- # set to None if data (nullable) is None
91
- # and model_fields_set contains the field
92
- if self.data is None and "data" in self.model_fields_set:
93
- _dict['data'] = None
94
-
95
- # set to None if message (nullable) is None
96
- # and model_fields_set contains the field
97
- if self.message is None and "message" in self.model_fields_set:
98
- _dict['message'] = None
99
-
100
- # set to None if errors (nullable) is None
101
- # and model_fields_set contains the field
102
- if self.errors is None and "errors" in self.model_fields_set:
103
- _dict['errors'] = None
104
-
105
- return _dict
106
-
107
- @classmethod
108
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109
- """Create an instance of BaseResponseFunctionThreatScore from a dict"""
110
- if obj is None:
111
- return None
112
-
113
- if not isinstance(obj, dict):
114
- return cls.model_validate(obj)
115
-
116
- _obj = cls.model_validate({
117
- "status": obj.get("status") if obj.get("status") is not None else True,
118
- "data": FunctionThreatScore.from_dict(obj["data"]) if obj.get("data") is not None else None,
119
- "message": obj.get("message"),
120
- "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
121
- "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None
122
- })
123
- return _obj
124
-
125
-
@@ -1,98 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
20
- from typing import Any, ClassVar, Dict, List, Union
21
- from typing import Optional, Set
22
- from typing_extensions import Self
23
-
24
- class FunctionAnalysisThreatScoreData(BaseModel):
25
- """
26
- FunctionAnalysisThreatScoreData
27
- """ # noqa: E501
28
- min: Union[StrictFloat, StrictInt] = Field(description="The minimum value for the analysis score")
29
- max: Union[StrictFloat, StrictInt] = Field(description="The maximum value for the analysis score")
30
- average: Union[StrictFloat, StrictInt] = Field(description="The average value for the analysis score")
31
- upper: Union[StrictFloat, StrictInt] = Field(description="The upper limit for the analysis score")
32
- lower: Union[StrictFloat, StrictInt] = Field(description="The lower limit for the analysis score")
33
- malware_count: StrictInt = Field(description="Number of malware binaries used in threat score calculation")
34
- benign_count: StrictInt = Field(description="Number of benign binaries used in threat score calculation")
35
- __properties: ClassVar[List[str]] = ["min", "max", "average", "upper", "lower", "malware_count", "benign_count"]
36
-
37
- model_config = ConfigDict(
38
- populate_by_name=True,
39
- validate_assignment=True,
40
- protected_namespaces=(),
41
- )
42
-
43
-
44
- def to_str(self) -> str:
45
- """Returns the string representation of the model using alias"""
46
- return pprint.pformat(self.model_dump(by_alias=True))
47
-
48
- def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
-
53
- @classmethod
54
- def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of FunctionAnalysisThreatScoreData from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- return _dict
77
-
78
- @classmethod
79
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of FunctionAnalysisThreatScoreData from a dict"""
81
- if obj is None:
82
- return None
83
-
84
- if not isinstance(obj, dict):
85
- return cls.model_validate(obj)
86
-
87
- _obj = cls.model_validate({
88
- "min": obj.get("min"),
89
- "max": obj.get("max"),
90
- "average": obj.get("average"),
91
- "upper": obj.get("upper"),
92
- "lower": obj.get("lower"),
93
- "malware_count": obj.get("malware_count"),
94
- "benign_count": obj.get("benign_count")
95
- })
96
- return _obj
97
-
98
-
@@ -1,99 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field
20
- from typing import Any, ClassVar, Dict, List
21
- from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class FunctionThreatScore(BaseModel):
26
- """
27
- FunctionThreatScore
28
- """ # noqa: E501
29
- results: Dict[str, FunctionAnalysisThreatScoreData] = Field(description="The results of the function threat")
30
- __properties: ClassVar[List[str]] = ["results"]
31
-
32
- model_config = ConfigDict(
33
- populate_by_name=True,
34
- validate_assignment=True,
35
- protected_namespaces=(),
36
- )
37
-
38
-
39
- def to_str(self) -> str:
40
- """Returns the string representation of the model using alias"""
41
- return pprint.pformat(self.model_dump(by_alias=True))
42
-
43
- def to_json(self) -> str:
44
- """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
-
48
- @classmethod
49
- def from_json(cls, json_str: str) -> Optional[Self]:
50
- """Create an instance of FunctionThreatScore from a JSON string"""
51
- return cls.from_dict(json.loads(json_str))
52
-
53
- def to_dict(self) -> Dict[str, Any]:
54
- """Return the dictionary representation of the model using alias.
55
-
56
- This has the following differences from calling pydantic's
57
- `self.model_dump(by_alias=True)`:
58
-
59
- * `None` is only added to the output dict for nullable fields that
60
- were set at model initialization. Other fields with value `None`
61
- are ignored.
62
- """
63
- excluded_fields: Set[str] = set([
64
- ])
65
-
66
- _dict = self.model_dump(
67
- by_alias=True,
68
- exclude=excluded_fields,
69
- exclude_none=True,
70
- )
71
- # override the default output from pydantic by calling `to_dict()` of each value in results (dict)
72
- _field_dict = {}
73
- if self.results:
74
- for _key_results in self.results:
75
- if self.results[_key_results]:
76
- _field_dict[_key_results] = self.results[_key_results].to_dict()
77
- _dict['results'] = _field_dict
78
- return _dict
79
-
80
- @classmethod
81
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
- """Create an instance of FunctionThreatScore from a dict"""
83
- if obj is None:
84
- return None
85
-
86
- if not isinstance(obj, dict):
87
- return cls.model_validate(obj)
88
-
89
- _obj = cls.model_validate({
90
- "results": dict(
91
- (_k, FunctionAnalysisThreatScoreData.from_dict(_v))
92
- for _k, _v in obj["results"].items()
93
- )
94
- if obj.get("results") is not None
95
- else None
96
- })
97
- return _obj
98
-
99
-