kalir-python 0.1.0__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.
Files changed (163) hide show
  1. kalir/__init__.py +11 -0
  2. kalir/api/__init__.py +1 -0
  3. kalir/api/assets/__init__.py +1 -0
  4. kalir/api/assets/create_asset.py +193 -0
  5. kalir/api/assets/delete_asset.py +182 -0
  6. kalir/api/assets/get_asset.py +186 -0
  7. kalir/api/assets/list_assets.py +165 -0
  8. kalir/api/assets/update_asset.py +206 -0
  9. kalir/api/events/__init__.py +1 -0
  10. kalir/api/events/get_event.py +194 -0
  11. kalir/api/events/ingest_event.py +215 -0
  12. kalir/api/events/list_events.py +259 -0
  13. kalir/api/exposures/__init__.py +1 -0
  14. kalir/api/exposures/count_exposures.py +165 -0
  15. kalir/api/exposures/get_infostealer_summary.py +181 -0
  16. kalir/api/exposures/list_exposures.py +225 -0
  17. kalir/api/incidents/__init__.py +1 -0
  18. kalir/api/incidents/get_incident.py +194 -0
  19. kalir/api/incidents/list_incidents.py +265 -0
  20. kalir/api/incidents/update_incident_status.py +207 -0
  21. kalir/api/intel/__init__.py +1 -0
  22. kalir/api/intel/get_ransomware_stats.py +165 -0
  23. kalir/api/intel/list_ransomware_victims.py +165 -0
  24. kalir/api/mentions/__init__.py +1 -0
  25. kalir/api/mentions/list_mentions.py +283 -0
  26. kalir/api/overview/__init__.py +1 -0
  27. kalir/api/overview/get_overview.py +184 -0
  28. kalir/api/phishing/__init__.py +1 -0
  29. kalir/api/phishing/list_phishing.py +245 -0
  30. kalir/api/reports/__init__.py +1 -0
  31. kalir/api/reports/create_report.py +193 -0
  32. kalir/api/reports/download_report.py +186 -0
  33. kalir/api/reports/list_reports.py +165 -0
  34. kalir/api/rules/__init__.py +1 -0
  35. kalir/api/rules/create_rule.py +193 -0
  36. kalir/api/rules/delete_rule.py +183 -0
  37. kalir/api/rules/get_rule.py +187 -0
  38. kalir/api/rules/list_rules.py +165 -0
  39. kalir/api/rules/replace_rule.py +207 -0
  40. kalir/api/takedowns/__init__.py +1 -0
  41. kalir/api/takedowns/count_takedowns.py +165 -0
  42. kalir/api/takedowns/create_takedown.py +193 -0
  43. kalir/api/takedowns/delete_takedown.py +183 -0
  44. kalir/api/takedowns/get_takedown.py +187 -0
  45. kalir/api/takedowns/list_takedowns.py +165 -0
  46. kalir/api/takedowns/replace_takedown.py +210 -0
  47. kalir/api/takedowns/update_takedown.py +210 -0
  48. kalir/api/webhooks/__init__.py +1 -0
  49. kalir/api/webhooks/create_webhook.py +222 -0
  50. kalir/api/webhooks/delete_webhook.py +190 -0
  51. kalir/api/webhooks/get_webhook.py +194 -0
  52. kalir/api/webhooks/get_webhook_delivery.py +194 -0
  53. kalir/api/webhooks/list_webhook_deliveries.py +239 -0
  54. kalir/api/webhooks/list_webhook_event_types.py +165 -0
  55. kalir/api/webhooks/list_webhooks.py +172 -0
  56. kalir/api/webhooks/retry_webhook_delivery.py +190 -0
  57. kalir/api/webhooks/rotate_webhook_secret.py +202 -0
  58. kalir/api/webhooks/send_webhook_test.py +202 -0
  59. kalir/api/webhooks/update_webhook.py +229 -0
  60. kalir/client.py +271 -0
  61. kalir/errors.py +14 -0
  62. kalir/models/__init__.py +195 -0
  63. kalir/models/asset.py +162 -0
  64. kalir/models/asset_create.py +122 -0
  65. kalir/models/asset_create_asset_type.py +14 -0
  66. kalir/models/asset_create_metadata.py +64 -0
  67. kalir/models/count_exposures_response_200.py +78 -0
  68. kalir/models/count_takedowns_response_200.py +96 -0
  69. kalir/models/create_report_body.py +96 -0
  70. kalir/models/create_report_body_type.py +10 -0
  71. kalir/models/create_webhook_response_201.py +111 -0
  72. kalir/models/error.py +84 -0
  73. kalir/models/error_error.py +106 -0
  74. kalir/models/error_error_type.py +15 -0
  75. kalir/models/event.py +151 -0
  76. kalir/models/event_asset.py +87 -0
  77. kalir/models/event_ingest.py +146 -0
  78. kalir/models/event_ingest_asset.py +87 -0
  79. kalir/models/event_ingest_evidence.py +64 -0
  80. kalir/models/event_ingest_source.py +87 -0
  81. kalir/models/exposure.py +137 -0
  82. kalir/models/exposure_webhook_event.py +152 -0
  83. kalir/models/exposure_webhook_event_data.py +115 -0
  84. kalir/models/exposure_webhook_event_data_exposure.py +149 -0
  85. kalir/models/exposure_webhook_event_data_infection.py +136 -0
  86. kalir/models/exposure_webhook_event_type.py +8 -0
  87. kalir/models/get_incident_response_200.py +174 -0
  88. kalir/models/get_infostealer_summary_response_200.py +100 -0
  89. kalir/models/get_ransomware_stats_response_200.py +156 -0
  90. kalir/models/get_ransomware_stats_response_200_top_countries_7d_item.py +64 -0
  91. kalir/models/get_ransomware_stats_response_200_top_groups_7d_item.py +64 -0
  92. kalir/models/incident.py +170 -0
  93. kalir/models/incident_severity.py +10 -0
  94. kalir/models/incident_status.py +10 -0
  95. kalir/models/incident_webhook_event.py +152 -0
  96. kalir/models/incident_webhook_event_data.py +115 -0
  97. kalir/models/incident_webhook_event_data_previous.py +88 -0
  98. kalir/models/incident_webhook_event_type.py +9 -0
  99. kalir/models/infostealer_domain_summary.py +122 -0
  100. kalir/models/infostealer_domain_summary_snapshot.py +201 -0
  101. kalir/models/infostealer_domain_summary_snapshot_top_employee_urls_item.py +87 -0
  102. kalir/models/infostealer_domain_summary_snapshot_top_families_item.py +87 -0
  103. kalir/models/list_assets_response_200.py +100 -0
  104. kalir/models/list_events_response_200.py +109 -0
  105. kalir/models/list_exposures_response_200.py +127 -0
  106. kalir/models/list_incidents_bucket.py +10 -0
  107. kalir/models/list_incidents_response_200.py +149 -0
  108. kalir/models/list_incidents_response_200_counts.py +106 -0
  109. kalir/models/list_incidents_status.py +12 -0
  110. kalir/models/list_mentions_response_200.py +122 -0
  111. kalir/models/list_mentions_source.py +8 -0
  112. kalir/models/list_phishing_response_200.py +122 -0
  113. kalir/models/list_phishing_verdict.py +11 -0
  114. kalir/models/list_ransomware_victims_response_200.py +109 -0
  115. kalir/models/list_ransomware_victims_response_200_victims_item.py +64 -0
  116. kalir/models/list_reports_response_200.py +109 -0
  117. kalir/models/list_rules_response_200.py +100 -0
  118. kalir/models/list_takedowns_response_200.py +109 -0
  119. kalir/models/list_webhook_deliveries_response_200.py +122 -0
  120. kalir/models/list_webhook_event_types_response_200.py +100 -0
  121. kalir/models/list_webhook_event_types_response_200_data_item.py +87 -0
  122. kalir/models/list_webhooks_response_200.py +100 -0
  123. kalir/models/mention.py +194 -0
  124. kalir/models/mention_source.py +8 -0
  125. kalir/models/overview.py +231 -0
  126. kalir/models/overview_assets.py +96 -0
  127. kalir/models/overview_exposures.py +105 -0
  128. kalir/models/overview_incidents.py +114 -0
  129. kalir/models/overview_phishing.py +87 -0
  130. kalir/models/overview_risk_level.py +10 -0
  131. kalir/models/overview_takedowns.py +87 -0
  132. kalir/models/pagination.py +105 -0
  133. kalir/models/phishing_domain.py +186 -0
  134. kalir/models/phishing_domain_verdict.py +11 -0
  135. kalir/models/report.py +182 -0
  136. kalir/models/report_parameters.py +181 -0
  137. kalir/models/report_parameters_date_range.py +11 -0
  138. kalir/models/report_parameters_language.py +8 -0
  139. kalir/models/report_parameters_sections_item.py +15 -0
  140. kalir/models/report_status.py +10 -0
  141. kalir/models/rotate_webhook_secret_response_200.py +87 -0
  142. kalir/models/rule.py +174 -0
  143. kalir/models/rule_input.py +134 -0
  144. kalir/models/rule_input_actions_item.py +64 -0
  145. kalir/models/takedown.py +163 -0
  146. kalir/models/takedown_create.py +113 -0
  147. kalir/models/takedown_update.py +96 -0
  148. kalir/models/update_incident_status_body.py +90 -0
  149. kalir/models/update_incident_status_body_status.py +10 -0
  150. kalir/models/webhook_delivery.py +274 -0
  151. kalir/models/webhook_delivery_payload.py +64 -0
  152. kalir/models/webhook_delivery_status.py +9 -0
  153. kalir/models/webhook_endpoint.py +216 -0
  154. kalir/models/webhook_endpoint_input.py +124 -0
  155. kalir/models/webhook_endpoint_input_event_types_item.py +11 -0
  156. kalir/models/webhook_incident.py +232 -0
  157. kalir/models/webhook_incident_severity.py +10 -0
  158. kalir/py.typed +1 -0
  159. kalir/types.py +53 -0
  160. kalir/webhooks.py +63 -0
  161. kalir_python-0.1.0.dist-info/METADATA +76 -0
  162. kalir_python-0.1.0.dist-info/RECORD +163 -0
  163. kalir_python-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,10 @@
1
+ from enum import StrEnum
2
+
3
+ class ListIncidentsBucket(StrEnum):
4
+ AUTO_DISMISSED = "auto_dismissed"
5
+ IN_PROGRESS = "in_progress"
6
+ OPEN = "open"
7
+ RESOLVED = "resolved"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,149 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.incident import Incident
16
+ from ..models.list_incidents_response_200_counts import ListIncidentsResponse200Counts
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="ListIncidentsResponse200")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class ListIncidentsResponse200:
28
+ """
29
+ Attributes:
30
+ incidents (list[Incident] | Unset):
31
+ total (int | Unset):
32
+ limit (int | Unset):
33
+ offset (int | Unset):
34
+ counts (ListIncidentsResponse200Counts | Unset): Incident counts per lifecycle bucket.
35
+ """
36
+
37
+ incidents: list[Incident] | Unset = UNSET
38
+ total: int | Unset = UNSET
39
+ limit: int | Unset = UNSET
40
+ offset: int | Unset = UNSET
41
+ counts: ListIncidentsResponse200Counts | Unset = UNSET
42
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
43
+
44
+
45
+
46
+
47
+
48
+ def to_dict(self) -> dict[str, Any]:
49
+ from ..models.incident import Incident # noqa: PLC0415
50
+ from ..models.list_incidents_response_200_counts import ListIncidentsResponse200Counts # noqa: PLC0415
51
+ incidents: list[dict[str, Any]] | Unset = UNSET
52
+ if not isinstance(self.incidents, Unset):
53
+ incidents = []
54
+ for incidents_item_data in self.incidents:
55
+ incidents_item = incidents_item_data.to_dict()
56
+ incidents.append(incidents_item)
57
+
58
+
59
+
60
+ total = self.total
61
+
62
+ limit = self.limit
63
+
64
+ offset = self.offset
65
+
66
+ counts: dict[str, Any] | Unset = UNSET
67
+ if not isinstance(self.counts, Unset):
68
+ counts = self.counts.to_dict()
69
+
70
+
71
+ field_dict: dict[str, Any] = {}
72
+ field_dict.update(self.additional_properties)
73
+ field_dict.update({
74
+ })
75
+ if incidents is not UNSET:
76
+ field_dict["incidents"] = incidents
77
+ if total is not UNSET:
78
+ field_dict["total"] = total
79
+ if limit is not UNSET:
80
+ field_dict["limit"] = limit
81
+ if offset is not UNSET:
82
+ field_dict["offset"] = offset
83
+ if counts is not UNSET:
84
+ field_dict["counts"] = counts
85
+
86
+ return field_dict
87
+
88
+
89
+
90
+ @classmethod
91
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
92
+ from ..models.incident import Incident # noqa: PLC0415
93
+ from ..models.list_incidents_response_200_counts import ListIncidentsResponse200Counts # noqa: PLC0415
94
+ d = dict(src_dict)
95
+ _incidents = d.pop("incidents", UNSET)
96
+ incidents: list[Incident] | Unset = UNSET
97
+ if _incidents is not UNSET:
98
+ incidents = []
99
+ for incidents_item_data in _incidents:
100
+ incidents_item = Incident.from_dict(incidents_item_data)
101
+
102
+
103
+
104
+ incidents.append(incidents_item)
105
+
106
+
107
+ total = d.pop("total", UNSET)
108
+
109
+ limit = d.pop("limit", UNSET)
110
+
111
+ offset = d.pop("offset", UNSET)
112
+
113
+ _counts = d.pop("counts", UNSET)
114
+ counts: ListIncidentsResponse200Counts | Unset
115
+ if isinstance(_counts, Unset):
116
+ counts = UNSET
117
+ else:
118
+ counts = ListIncidentsResponse200Counts.from_dict(_counts)
119
+
120
+
121
+
122
+
123
+ list_incidents_response_200 = cls(
124
+ incidents=incidents,
125
+ total=total,
126
+ limit=limit,
127
+ offset=offset,
128
+ counts=counts,
129
+ )
130
+
131
+
132
+ list_incidents_response_200.additional_properties = d
133
+ return list_incidents_response_200
134
+
135
+ @property
136
+ def additional_keys(self) -> list[str]:
137
+ return list(self.additional_properties.keys())
138
+
139
+ def __getitem__(self, key: str) -> Any:
140
+ return self.additional_properties[key]
141
+
142
+ def __setitem__(self, key: str, value: Any) -> None:
143
+ self.additional_properties[key] = value
144
+
145
+ def __delitem__(self, key: str) -> None:
146
+ del self.additional_properties[key]
147
+
148
+ def __contains__(self, key: str) -> bool:
149
+ return key in self.additional_properties
@@ -0,0 +1,106 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+
13
+
14
+
15
+
16
+
17
+
18
+ T = TypeVar("T", bound="ListIncidentsResponse200Counts")
19
+
20
+
21
+
22
+ @_attrs_define
23
+ class ListIncidentsResponse200Counts:
24
+ """ Incident counts per lifecycle bucket.
25
+
26
+ Attributes:
27
+ open_ (int | Unset):
28
+ in_progress (int | Unset):
29
+ resolved (int | Unset):
30
+ auto_dismissed (int | Unset):
31
+ """
32
+
33
+ open_: int | Unset = UNSET
34
+ in_progress: int | Unset = UNSET
35
+ resolved: int | Unset = UNSET
36
+ auto_dismissed: int | Unset = UNSET
37
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
38
+
39
+
40
+
41
+
42
+
43
+ def to_dict(self) -> dict[str, Any]:
44
+ open_ = self.open_
45
+
46
+ in_progress = self.in_progress
47
+
48
+ resolved = self.resolved
49
+
50
+ auto_dismissed = self.auto_dismissed
51
+
52
+
53
+ field_dict: dict[str, Any] = {}
54
+ field_dict.update(self.additional_properties)
55
+ field_dict.update({
56
+ })
57
+ if open_ is not UNSET:
58
+ field_dict["open"] = open_
59
+ if in_progress is not UNSET:
60
+ field_dict["in_progress"] = in_progress
61
+ if resolved is not UNSET:
62
+ field_dict["resolved"] = resolved
63
+ if auto_dismissed is not UNSET:
64
+ field_dict["auto_dismissed"] = auto_dismissed
65
+
66
+ return field_dict
67
+
68
+
69
+
70
+ @classmethod
71
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
72
+ d = dict(src_dict)
73
+ open_ = d.pop("open", UNSET)
74
+
75
+ in_progress = d.pop("in_progress", UNSET)
76
+
77
+ resolved = d.pop("resolved", UNSET)
78
+
79
+ auto_dismissed = d.pop("auto_dismissed", UNSET)
80
+
81
+ list_incidents_response_200_counts = cls(
82
+ open_=open_,
83
+ in_progress=in_progress,
84
+ resolved=resolved,
85
+ auto_dismissed=auto_dismissed,
86
+ )
87
+
88
+
89
+ list_incidents_response_200_counts.additional_properties = d
90
+ return list_incidents_response_200_counts
91
+
92
+ @property
93
+ def additional_keys(self) -> list[str]:
94
+ return list(self.additional_properties.keys())
95
+
96
+ def __getitem__(self, key: str) -> Any:
97
+ return self.additional_properties[key]
98
+
99
+ def __setitem__(self, key: str, value: Any) -> None:
100
+ self.additional_properties[key] = value
101
+
102
+ def __delitem__(self, key: str) -> None:
103
+ del self.additional_properties[key]
104
+
105
+ def __contains__(self, key: str) -> bool:
106
+ return key in self.additional_properties
@@ -0,0 +1,12 @@
1
+ from enum import StrEnum
2
+
3
+ class ListIncidentsStatus(StrEnum):
4
+ ACKNOWLEDGED = "acknowledged"
5
+ AUTO_DISMISSED = "auto_dismissed"
6
+ CLOSED = "closed"
7
+ MITIGATED = "mitigated"
8
+ OPEN = "open"
9
+ RESOLVED = "resolved"
10
+
11
+ def __str__(self) -> str:
12
+ return str(self.value)
@@ -0,0 +1,122 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.mention import Mention
16
+ from ..models.pagination import Pagination
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="ListMentionsResponse200")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class ListMentionsResponse200:
28
+ """
29
+ Attributes:
30
+ data (list[Mention] | Unset):
31
+ pagination (Pagination | Unset):
32
+ """
33
+
34
+ data: list[Mention] | Unset = UNSET
35
+ pagination: Pagination | Unset = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+
39
+
40
+
41
+
42
+ def to_dict(self) -> dict[str, Any]:
43
+ from ..models.mention import Mention # noqa: PLC0415
44
+ from ..models.pagination import Pagination # noqa: PLC0415
45
+ data: list[dict[str, Any]] | Unset = UNSET
46
+ if not isinstance(self.data, Unset):
47
+ data = []
48
+ for data_item_data in self.data:
49
+ data_item = data_item_data.to_dict()
50
+ data.append(data_item)
51
+
52
+
53
+
54
+ pagination: dict[str, Any] | Unset = UNSET
55
+ if not isinstance(self.pagination, Unset):
56
+ pagination = self.pagination.to_dict()
57
+
58
+
59
+ field_dict: dict[str, Any] = {}
60
+ field_dict.update(self.additional_properties)
61
+ field_dict.update({
62
+ })
63
+ if data is not UNSET:
64
+ field_dict["data"] = data
65
+ if pagination is not UNSET:
66
+ field_dict["pagination"] = pagination
67
+
68
+ return field_dict
69
+
70
+
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ from ..models.mention import Mention # noqa: PLC0415
75
+ from ..models.pagination import Pagination # noqa: PLC0415
76
+ d = dict(src_dict)
77
+ _data = d.pop("data", UNSET)
78
+ data: list[Mention] | Unset = UNSET
79
+ if _data is not UNSET:
80
+ data = []
81
+ for data_item_data in _data:
82
+ data_item = Mention.from_dict(data_item_data)
83
+
84
+
85
+
86
+ data.append(data_item)
87
+
88
+
89
+ _pagination = d.pop("pagination", UNSET)
90
+ pagination: Pagination | Unset
91
+ if isinstance(_pagination, Unset):
92
+ pagination = UNSET
93
+ else:
94
+ pagination = Pagination.from_dict(_pagination)
95
+
96
+
97
+
98
+
99
+ list_mentions_response_200 = cls(
100
+ data=data,
101
+ pagination=pagination,
102
+ )
103
+
104
+
105
+ list_mentions_response_200.additional_properties = d
106
+ return list_mentions_response_200
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,8 @@
1
+ from enum import StrEnum
2
+
3
+ class ListMentionsSource(StrEnum):
4
+ DARKWEB = "darkweb"
5
+ TELEGRAM = "telegram"
6
+
7
+ def __str__(self) -> str:
8
+ return str(self.value)
@@ -0,0 +1,122 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.pagination import Pagination
16
+ from ..models.phishing_domain import PhishingDomain
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="ListPhishingResponse200")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class ListPhishingResponse200:
28
+ """
29
+ Attributes:
30
+ data (list[PhishingDomain] | Unset):
31
+ pagination (Pagination | Unset):
32
+ """
33
+
34
+ data: list[PhishingDomain] | Unset = UNSET
35
+ pagination: Pagination | Unset = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+
39
+
40
+
41
+
42
+ def to_dict(self) -> dict[str, Any]:
43
+ from ..models.pagination import Pagination # noqa: PLC0415
44
+ from ..models.phishing_domain import PhishingDomain # noqa: PLC0415
45
+ data: list[dict[str, Any]] | Unset = UNSET
46
+ if not isinstance(self.data, Unset):
47
+ data = []
48
+ for data_item_data in self.data:
49
+ data_item = data_item_data.to_dict()
50
+ data.append(data_item)
51
+
52
+
53
+
54
+ pagination: dict[str, Any] | Unset = UNSET
55
+ if not isinstance(self.pagination, Unset):
56
+ pagination = self.pagination.to_dict()
57
+
58
+
59
+ field_dict: dict[str, Any] = {}
60
+ field_dict.update(self.additional_properties)
61
+ field_dict.update({
62
+ })
63
+ if data is not UNSET:
64
+ field_dict["data"] = data
65
+ if pagination is not UNSET:
66
+ field_dict["pagination"] = pagination
67
+
68
+ return field_dict
69
+
70
+
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ from ..models.pagination import Pagination # noqa: PLC0415
75
+ from ..models.phishing_domain import PhishingDomain # noqa: PLC0415
76
+ d = dict(src_dict)
77
+ _data = d.pop("data", UNSET)
78
+ data: list[PhishingDomain] | Unset = UNSET
79
+ if _data is not UNSET:
80
+ data = []
81
+ for data_item_data in _data:
82
+ data_item = PhishingDomain.from_dict(data_item_data)
83
+
84
+
85
+
86
+ data.append(data_item)
87
+
88
+
89
+ _pagination = d.pop("pagination", UNSET)
90
+ pagination: Pagination | Unset
91
+ if isinstance(_pagination, Unset):
92
+ pagination = UNSET
93
+ else:
94
+ pagination = Pagination.from_dict(_pagination)
95
+
96
+
97
+
98
+
99
+ list_phishing_response_200 = cls(
100
+ data=data,
101
+ pagination=pagination,
102
+ )
103
+
104
+
105
+ list_phishing_response_200.additional_properties = d
106
+ return list_phishing_response_200
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,11 @@
1
+ from enum import StrEnum
2
+
3
+ class ListPhishingVerdict(StrEnum):
4
+ CONFIRMED = "confirmed"
5
+ INACTIVE = "inactive"
6
+ POSSIBLE = "possible"
7
+ POSSIBLE_FP = "possible_fp"
8
+ UNVERIFIED = "unverified"
9
+
10
+ def __str__(self) -> str:
11
+ return str(self.value)
@@ -0,0 +1,109 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.list_ransomware_victims_response_200_victims_item import ListRansomwareVictimsResponse200VictimsItem
16
+
17
+
18
+
19
+
20
+
21
+ T = TypeVar("T", bound="ListRansomwareVictimsResponse200")
22
+
23
+
24
+
25
+ @_attrs_define
26
+ class ListRansomwareVictimsResponse200:
27
+ """
28
+ Attributes:
29
+ victims (list[ListRansomwareVictimsResponse200VictimsItem] | Unset):
30
+ total (int | Unset):
31
+ """
32
+
33
+ victims: list[ListRansomwareVictimsResponse200VictimsItem] | Unset = UNSET
34
+ total: int | Unset = UNSET
35
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
+
37
+
38
+
39
+
40
+
41
+ def to_dict(self) -> dict[str, Any]:
42
+ from ..models.list_ransomware_victims_response_200_victims_item import ListRansomwareVictimsResponse200VictimsItem # noqa: PLC0415
43
+ victims: list[dict[str, Any]] | Unset = UNSET
44
+ if not isinstance(self.victims, Unset):
45
+ victims = []
46
+ for victims_item_data in self.victims:
47
+ victims_item = victims_item_data.to_dict()
48
+ victims.append(victims_item)
49
+
50
+
51
+
52
+ total = self.total
53
+
54
+
55
+ field_dict: dict[str, Any] = {}
56
+ field_dict.update(self.additional_properties)
57
+ field_dict.update({
58
+ })
59
+ if victims is not UNSET:
60
+ field_dict["victims"] = victims
61
+ if total is not UNSET:
62
+ field_dict["total"] = total
63
+
64
+ return field_dict
65
+
66
+
67
+
68
+ @classmethod
69
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
70
+ from ..models.list_ransomware_victims_response_200_victims_item import ListRansomwareVictimsResponse200VictimsItem # noqa: PLC0415
71
+ d = dict(src_dict)
72
+ _victims = d.pop("victims", UNSET)
73
+ victims: list[ListRansomwareVictimsResponse200VictimsItem] | Unset = UNSET
74
+ if _victims is not UNSET:
75
+ victims = []
76
+ for victims_item_data in _victims:
77
+ victims_item = ListRansomwareVictimsResponse200VictimsItem.from_dict(victims_item_data)
78
+
79
+
80
+
81
+ victims.append(victims_item)
82
+
83
+
84
+ total = d.pop("total", UNSET)
85
+
86
+ list_ransomware_victims_response_200 = cls(
87
+ victims=victims,
88
+ total=total,
89
+ )
90
+
91
+
92
+ list_ransomware_victims_response_200.additional_properties = d
93
+ return list_ransomware_victims_response_200
94
+
95
+ @property
96
+ def additional_keys(self) -> list[str]:
97
+ return list(self.additional_properties.keys())
98
+
99
+ def __getitem__(self, key: str) -> Any:
100
+ return self.additional_properties[key]
101
+
102
+ def __setitem__(self, key: str, value: Any) -> None:
103
+ self.additional_properties[key] = value
104
+
105
+ def __delitem__(self, key: str) -> None:
106
+ del self.additional_properties[key]
107
+
108
+ def __contains__(self, key: str) -> bool:
109
+ return key in self.additional_properties