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.
- kalir/__init__.py +11 -0
- kalir/api/__init__.py +1 -0
- kalir/api/assets/__init__.py +1 -0
- kalir/api/assets/create_asset.py +193 -0
- kalir/api/assets/delete_asset.py +182 -0
- kalir/api/assets/get_asset.py +186 -0
- kalir/api/assets/list_assets.py +165 -0
- kalir/api/assets/update_asset.py +206 -0
- kalir/api/events/__init__.py +1 -0
- kalir/api/events/get_event.py +194 -0
- kalir/api/events/ingest_event.py +215 -0
- kalir/api/events/list_events.py +259 -0
- kalir/api/exposures/__init__.py +1 -0
- kalir/api/exposures/count_exposures.py +165 -0
- kalir/api/exposures/get_infostealer_summary.py +181 -0
- kalir/api/exposures/list_exposures.py +225 -0
- kalir/api/incidents/__init__.py +1 -0
- kalir/api/incidents/get_incident.py +194 -0
- kalir/api/incidents/list_incidents.py +265 -0
- kalir/api/incidents/update_incident_status.py +207 -0
- kalir/api/intel/__init__.py +1 -0
- kalir/api/intel/get_ransomware_stats.py +165 -0
- kalir/api/intel/list_ransomware_victims.py +165 -0
- kalir/api/mentions/__init__.py +1 -0
- kalir/api/mentions/list_mentions.py +283 -0
- kalir/api/overview/__init__.py +1 -0
- kalir/api/overview/get_overview.py +184 -0
- kalir/api/phishing/__init__.py +1 -0
- kalir/api/phishing/list_phishing.py +245 -0
- kalir/api/reports/__init__.py +1 -0
- kalir/api/reports/create_report.py +193 -0
- kalir/api/reports/download_report.py +186 -0
- kalir/api/reports/list_reports.py +165 -0
- kalir/api/rules/__init__.py +1 -0
- kalir/api/rules/create_rule.py +193 -0
- kalir/api/rules/delete_rule.py +183 -0
- kalir/api/rules/get_rule.py +187 -0
- kalir/api/rules/list_rules.py +165 -0
- kalir/api/rules/replace_rule.py +207 -0
- kalir/api/takedowns/__init__.py +1 -0
- kalir/api/takedowns/count_takedowns.py +165 -0
- kalir/api/takedowns/create_takedown.py +193 -0
- kalir/api/takedowns/delete_takedown.py +183 -0
- kalir/api/takedowns/get_takedown.py +187 -0
- kalir/api/takedowns/list_takedowns.py +165 -0
- kalir/api/takedowns/replace_takedown.py +210 -0
- kalir/api/takedowns/update_takedown.py +210 -0
- kalir/api/webhooks/__init__.py +1 -0
- kalir/api/webhooks/create_webhook.py +222 -0
- kalir/api/webhooks/delete_webhook.py +190 -0
- kalir/api/webhooks/get_webhook.py +194 -0
- kalir/api/webhooks/get_webhook_delivery.py +194 -0
- kalir/api/webhooks/list_webhook_deliveries.py +239 -0
- kalir/api/webhooks/list_webhook_event_types.py +165 -0
- kalir/api/webhooks/list_webhooks.py +172 -0
- kalir/api/webhooks/retry_webhook_delivery.py +190 -0
- kalir/api/webhooks/rotate_webhook_secret.py +202 -0
- kalir/api/webhooks/send_webhook_test.py +202 -0
- kalir/api/webhooks/update_webhook.py +229 -0
- kalir/client.py +271 -0
- kalir/errors.py +14 -0
- kalir/models/__init__.py +195 -0
- kalir/models/asset.py +162 -0
- kalir/models/asset_create.py +122 -0
- kalir/models/asset_create_asset_type.py +14 -0
- kalir/models/asset_create_metadata.py +64 -0
- kalir/models/count_exposures_response_200.py +78 -0
- kalir/models/count_takedowns_response_200.py +96 -0
- kalir/models/create_report_body.py +96 -0
- kalir/models/create_report_body_type.py +10 -0
- kalir/models/create_webhook_response_201.py +111 -0
- kalir/models/error.py +84 -0
- kalir/models/error_error.py +106 -0
- kalir/models/error_error_type.py +15 -0
- kalir/models/event.py +151 -0
- kalir/models/event_asset.py +87 -0
- kalir/models/event_ingest.py +146 -0
- kalir/models/event_ingest_asset.py +87 -0
- kalir/models/event_ingest_evidence.py +64 -0
- kalir/models/event_ingest_source.py +87 -0
- kalir/models/exposure.py +137 -0
- kalir/models/exposure_webhook_event.py +152 -0
- kalir/models/exposure_webhook_event_data.py +115 -0
- kalir/models/exposure_webhook_event_data_exposure.py +149 -0
- kalir/models/exposure_webhook_event_data_infection.py +136 -0
- kalir/models/exposure_webhook_event_type.py +8 -0
- kalir/models/get_incident_response_200.py +174 -0
- kalir/models/get_infostealer_summary_response_200.py +100 -0
- kalir/models/get_ransomware_stats_response_200.py +156 -0
- kalir/models/get_ransomware_stats_response_200_top_countries_7d_item.py +64 -0
- kalir/models/get_ransomware_stats_response_200_top_groups_7d_item.py +64 -0
- kalir/models/incident.py +170 -0
- kalir/models/incident_severity.py +10 -0
- kalir/models/incident_status.py +10 -0
- kalir/models/incident_webhook_event.py +152 -0
- kalir/models/incident_webhook_event_data.py +115 -0
- kalir/models/incident_webhook_event_data_previous.py +88 -0
- kalir/models/incident_webhook_event_type.py +9 -0
- kalir/models/infostealer_domain_summary.py +122 -0
- kalir/models/infostealer_domain_summary_snapshot.py +201 -0
- kalir/models/infostealer_domain_summary_snapshot_top_employee_urls_item.py +87 -0
- kalir/models/infostealer_domain_summary_snapshot_top_families_item.py +87 -0
- kalir/models/list_assets_response_200.py +100 -0
- kalir/models/list_events_response_200.py +109 -0
- kalir/models/list_exposures_response_200.py +127 -0
- kalir/models/list_incidents_bucket.py +10 -0
- kalir/models/list_incidents_response_200.py +149 -0
- kalir/models/list_incidents_response_200_counts.py +106 -0
- kalir/models/list_incidents_status.py +12 -0
- kalir/models/list_mentions_response_200.py +122 -0
- kalir/models/list_mentions_source.py +8 -0
- kalir/models/list_phishing_response_200.py +122 -0
- kalir/models/list_phishing_verdict.py +11 -0
- kalir/models/list_ransomware_victims_response_200.py +109 -0
- kalir/models/list_ransomware_victims_response_200_victims_item.py +64 -0
- kalir/models/list_reports_response_200.py +109 -0
- kalir/models/list_rules_response_200.py +100 -0
- kalir/models/list_takedowns_response_200.py +109 -0
- kalir/models/list_webhook_deliveries_response_200.py +122 -0
- kalir/models/list_webhook_event_types_response_200.py +100 -0
- kalir/models/list_webhook_event_types_response_200_data_item.py +87 -0
- kalir/models/list_webhooks_response_200.py +100 -0
- kalir/models/mention.py +194 -0
- kalir/models/mention_source.py +8 -0
- kalir/models/overview.py +231 -0
- kalir/models/overview_assets.py +96 -0
- kalir/models/overview_exposures.py +105 -0
- kalir/models/overview_incidents.py +114 -0
- kalir/models/overview_phishing.py +87 -0
- kalir/models/overview_risk_level.py +10 -0
- kalir/models/overview_takedowns.py +87 -0
- kalir/models/pagination.py +105 -0
- kalir/models/phishing_domain.py +186 -0
- kalir/models/phishing_domain_verdict.py +11 -0
- kalir/models/report.py +182 -0
- kalir/models/report_parameters.py +181 -0
- kalir/models/report_parameters_date_range.py +11 -0
- kalir/models/report_parameters_language.py +8 -0
- kalir/models/report_parameters_sections_item.py +15 -0
- kalir/models/report_status.py +10 -0
- kalir/models/rotate_webhook_secret_response_200.py +87 -0
- kalir/models/rule.py +174 -0
- kalir/models/rule_input.py +134 -0
- kalir/models/rule_input_actions_item.py +64 -0
- kalir/models/takedown.py +163 -0
- kalir/models/takedown_create.py +113 -0
- kalir/models/takedown_update.py +96 -0
- kalir/models/update_incident_status_body.py +90 -0
- kalir/models/update_incident_status_body_status.py +10 -0
- kalir/models/webhook_delivery.py +274 -0
- kalir/models/webhook_delivery_payload.py +64 -0
- kalir/models/webhook_delivery_status.py +9 -0
- kalir/models/webhook_endpoint.py +216 -0
- kalir/models/webhook_endpoint_input.py +124 -0
- kalir/models/webhook_endpoint_input_event_types_item.py +11 -0
- kalir/models/webhook_incident.py +232 -0
- kalir/models/webhook_incident_severity.py +10 -0
- kalir/py.typed +1 -0
- kalir/types.py +53 -0
- kalir/webhooks.py +63 -0
- kalir_python-0.1.0.dist-info/METADATA +76 -0
- kalir_python-0.1.0.dist-info/RECORD +163 -0
- kalir_python-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,152 @@
|
|
|
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 ..models.exposure_webhook_event_type import ExposureWebhookEventType
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
from typing import cast
|
|
14
|
+
import datetime
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ..models.exposure_webhook_event_data import ExposureWebhookEventData
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
T = TypeVar("T", bound="ExposureWebhookEvent")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@_attrs_define
|
|
28
|
+
class ExposureWebhookEvent:
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
id (str | Unset):
|
|
32
|
+
type_ (ExposureWebhookEventType | Unset):
|
|
33
|
+
api_version (str | Unset):
|
|
34
|
+
created_at (datetime.datetime | Unset):
|
|
35
|
+
data (ExposureWebhookEventData | Unset):
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
id: str | Unset = UNSET
|
|
39
|
+
type_: ExposureWebhookEventType | Unset = UNSET
|
|
40
|
+
api_version: str | Unset = UNSET
|
|
41
|
+
created_at: datetime.datetime | Unset = UNSET
|
|
42
|
+
data: ExposureWebhookEventData | Unset = UNSET
|
|
43
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.exposure_webhook_event_data import ExposureWebhookEventData # noqa: PLC0415
|
|
51
|
+
id = self.id
|
|
52
|
+
|
|
53
|
+
type_: str | Unset = UNSET
|
|
54
|
+
if not isinstance(self.type_, Unset):
|
|
55
|
+
type_ = self.type_.value
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
api_version = self.api_version
|
|
59
|
+
|
|
60
|
+
created_at: str | Unset = UNSET
|
|
61
|
+
if not isinstance(self.created_at, Unset):
|
|
62
|
+
created_at = self.created_at.isoformat()
|
|
63
|
+
|
|
64
|
+
data: dict[str, Any] | Unset = UNSET
|
|
65
|
+
if not isinstance(self.data, Unset):
|
|
66
|
+
data = self.data.to_dict()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
field_dict: dict[str, Any] = {}
|
|
70
|
+
field_dict.update(self.additional_properties)
|
|
71
|
+
field_dict.update({
|
|
72
|
+
})
|
|
73
|
+
if id is not UNSET:
|
|
74
|
+
field_dict["id"] = id
|
|
75
|
+
if type_ is not UNSET:
|
|
76
|
+
field_dict["type"] = type_
|
|
77
|
+
if api_version is not UNSET:
|
|
78
|
+
field_dict["api_version"] = api_version
|
|
79
|
+
if created_at is not UNSET:
|
|
80
|
+
field_dict["created_at"] = created_at
|
|
81
|
+
if data is not UNSET:
|
|
82
|
+
field_dict["data"] = data
|
|
83
|
+
|
|
84
|
+
return field_dict
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
90
|
+
from ..models.exposure_webhook_event_data import ExposureWebhookEventData # noqa: PLC0415
|
|
91
|
+
d = dict(src_dict)
|
|
92
|
+
id = d.pop("id", UNSET)
|
|
93
|
+
|
|
94
|
+
_type_ = d.pop("type", UNSET)
|
|
95
|
+
type_: ExposureWebhookEventType | Unset
|
|
96
|
+
if isinstance(_type_, Unset):
|
|
97
|
+
type_ = UNSET
|
|
98
|
+
else:
|
|
99
|
+
type_ = ExposureWebhookEventType(_type_)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
api_version = d.pop("api_version", UNSET)
|
|
105
|
+
|
|
106
|
+
_created_at = d.pop("created_at", UNSET)
|
|
107
|
+
created_at: datetime.datetime | Unset
|
|
108
|
+
if isinstance(_created_at, Unset):
|
|
109
|
+
created_at = UNSET
|
|
110
|
+
else:
|
|
111
|
+
created_at = datetime.datetime.fromisoformat(_created_at)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
_data = d.pop("data", UNSET)
|
|
117
|
+
data: ExposureWebhookEventData | Unset
|
|
118
|
+
if isinstance(_data, Unset):
|
|
119
|
+
data = UNSET
|
|
120
|
+
else:
|
|
121
|
+
data = ExposureWebhookEventData.from_dict(_data)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
exposure_webhook_event = cls(
|
|
127
|
+
id=id,
|
|
128
|
+
type_=type_,
|
|
129
|
+
api_version=api_version,
|
|
130
|
+
created_at=created_at,
|
|
131
|
+
data=data,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
exposure_webhook_event.additional_properties = d
|
|
136
|
+
return exposure_webhook_event
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
def additional_keys(self) -> list[str]:
|
|
140
|
+
return list(self.additional_properties.keys())
|
|
141
|
+
|
|
142
|
+
def __getitem__(self, key: str) -> Any:
|
|
143
|
+
return self.additional_properties[key]
|
|
144
|
+
|
|
145
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
146
|
+
self.additional_properties[key] = value
|
|
147
|
+
|
|
148
|
+
def __delitem__(self, key: str) -> None:
|
|
149
|
+
del self.additional_properties[key]
|
|
150
|
+
|
|
151
|
+
def __contains__(self, key: str) -> bool:
|
|
152
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,115 @@
|
|
|
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.exposure_webhook_event_data_exposure import ExposureWebhookEventDataExposure
|
|
16
|
+
from ..models.exposure_webhook_event_data_infection import ExposureWebhookEventDataInfection
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
T = TypeVar("T", bound="ExposureWebhookEventData")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_attrs_define
|
|
27
|
+
class ExposureWebhookEventData:
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
exposure (ExposureWebhookEventDataExposure | Unset):
|
|
31
|
+
infection (ExposureWebhookEventDataInfection | Unset): Only on infostealer.detected.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
exposure: ExposureWebhookEventDataExposure | Unset = UNSET
|
|
35
|
+
infection: ExposureWebhookEventDataInfection | 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.exposure_webhook_event_data_exposure import ExposureWebhookEventDataExposure # noqa: PLC0415
|
|
44
|
+
from ..models.exposure_webhook_event_data_infection import ExposureWebhookEventDataInfection # noqa: PLC0415
|
|
45
|
+
exposure: dict[str, Any] | Unset = UNSET
|
|
46
|
+
if not isinstance(self.exposure, Unset):
|
|
47
|
+
exposure = self.exposure.to_dict()
|
|
48
|
+
|
|
49
|
+
infection: dict[str, Any] | Unset = UNSET
|
|
50
|
+
if not isinstance(self.infection, Unset):
|
|
51
|
+
infection = self.infection.to_dict()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
field_dict: dict[str, Any] = {}
|
|
55
|
+
field_dict.update(self.additional_properties)
|
|
56
|
+
field_dict.update({
|
|
57
|
+
})
|
|
58
|
+
if exposure is not UNSET:
|
|
59
|
+
field_dict["exposure"] = exposure
|
|
60
|
+
if infection is not UNSET:
|
|
61
|
+
field_dict["infection"] = infection
|
|
62
|
+
|
|
63
|
+
return field_dict
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
from ..models.exposure_webhook_event_data_exposure import ExposureWebhookEventDataExposure # noqa: PLC0415
|
|
70
|
+
from ..models.exposure_webhook_event_data_infection import ExposureWebhookEventDataInfection # noqa: PLC0415
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
_exposure = d.pop("exposure", UNSET)
|
|
73
|
+
exposure: ExposureWebhookEventDataExposure | Unset
|
|
74
|
+
if isinstance(_exposure, Unset):
|
|
75
|
+
exposure = UNSET
|
|
76
|
+
else:
|
|
77
|
+
exposure = ExposureWebhookEventDataExposure.from_dict(_exposure)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
_infection = d.pop("infection", UNSET)
|
|
83
|
+
infection: ExposureWebhookEventDataInfection | Unset
|
|
84
|
+
if isinstance(_infection, Unset):
|
|
85
|
+
infection = UNSET
|
|
86
|
+
else:
|
|
87
|
+
infection = ExposureWebhookEventDataInfection.from_dict(_infection)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
exposure_webhook_event_data = cls(
|
|
93
|
+
exposure=exposure,
|
|
94
|
+
infection=infection,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
exposure_webhook_event_data.additional_properties = d
|
|
99
|
+
return exposure_webhook_event_data
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def additional_keys(self) -> list[str]:
|
|
103
|
+
return list(self.additional_properties.keys())
|
|
104
|
+
|
|
105
|
+
def __getitem__(self, key: str) -> Any:
|
|
106
|
+
return self.additional_properties[key]
|
|
107
|
+
|
|
108
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
109
|
+
self.additional_properties[key] = value
|
|
110
|
+
|
|
111
|
+
def __delitem__(self, key: str) -> None:
|
|
112
|
+
del self.additional_properties[key]
|
|
113
|
+
|
|
114
|
+
def __contains__(self, key: str) -> bool:
|
|
115
|
+
return key in self.additional_properties
|
|
@@ -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
|
+
import datetime
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="ExposureWebhookEventDataExposure")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class ExposureWebhookEventDataExposure:
|
|
26
|
+
"""
|
|
27
|
+
Attributes:
|
|
28
|
+
id (str | Unset):
|
|
29
|
+
email (str | Unset):
|
|
30
|
+
source_name (str | Unset):
|
|
31
|
+
breach_date (datetime.datetime | Unset):
|
|
32
|
+
has_password (bool | Unset):
|
|
33
|
+
data_classes (list[str] | Unset):
|
|
34
|
+
url (str | Unset):
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
id: str | Unset = UNSET
|
|
38
|
+
email: str | Unset = UNSET
|
|
39
|
+
source_name: str | Unset = UNSET
|
|
40
|
+
breach_date: datetime.datetime | Unset = UNSET
|
|
41
|
+
has_password: bool | Unset = UNSET
|
|
42
|
+
data_classes: list[str] | Unset = UNSET
|
|
43
|
+
url: str | Unset = UNSET
|
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_dict(self) -> dict[str, Any]:
|
|
51
|
+
id = self.id
|
|
52
|
+
|
|
53
|
+
email = self.email
|
|
54
|
+
|
|
55
|
+
source_name = self.source_name
|
|
56
|
+
|
|
57
|
+
breach_date: str | Unset = UNSET
|
|
58
|
+
if not isinstance(self.breach_date, Unset):
|
|
59
|
+
breach_date = self.breach_date.isoformat()
|
|
60
|
+
|
|
61
|
+
has_password = self.has_password
|
|
62
|
+
|
|
63
|
+
data_classes: list[str] | Unset = UNSET
|
|
64
|
+
if not isinstance(self.data_classes, Unset):
|
|
65
|
+
data_classes = self.data_classes
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
url = self.url
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
field_dict: dict[str, Any] = {}
|
|
73
|
+
field_dict.update(self.additional_properties)
|
|
74
|
+
field_dict.update({
|
|
75
|
+
})
|
|
76
|
+
if id is not UNSET:
|
|
77
|
+
field_dict["id"] = id
|
|
78
|
+
if email is not UNSET:
|
|
79
|
+
field_dict["email"] = email
|
|
80
|
+
if source_name is not UNSET:
|
|
81
|
+
field_dict["source_name"] = source_name
|
|
82
|
+
if breach_date is not UNSET:
|
|
83
|
+
field_dict["breach_date"] = breach_date
|
|
84
|
+
if has_password is not UNSET:
|
|
85
|
+
field_dict["has_password"] = has_password
|
|
86
|
+
if data_classes is not UNSET:
|
|
87
|
+
field_dict["data_classes"] = data_classes
|
|
88
|
+
if url is not UNSET:
|
|
89
|
+
field_dict["url"] = url
|
|
90
|
+
|
|
91
|
+
return field_dict
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
id = d.pop("id", UNSET)
|
|
99
|
+
|
|
100
|
+
email = d.pop("email", UNSET)
|
|
101
|
+
|
|
102
|
+
source_name = d.pop("source_name", UNSET)
|
|
103
|
+
|
|
104
|
+
_breach_date = d.pop("breach_date", UNSET)
|
|
105
|
+
breach_date: datetime.datetime | Unset
|
|
106
|
+
if isinstance(_breach_date, Unset):
|
|
107
|
+
breach_date = UNSET
|
|
108
|
+
else:
|
|
109
|
+
breach_date = datetime.datetime.fromisoformat(_breach_date)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
has_password = d.pop("has_password", UNSET)
|
|
115
|
+
|
|
116
|
+
data_classes = cast(list[str], d.pop("data_classes", UNSET))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
url = d.pop("url", UNSET)
|
|
120
|
+
|
|
121
|
+
exposure_webhook_event_data_exposure = cls(
|
|
122
|
+
id=id,
|
|
123
|
+
email=email,
|
|
124
|
+
source_name=source_name,
|
|
125
|
+
breach_date=breach_date,
|
|
126
|
+
has_password=has_password,
|
|
127
|
+
data_classes=data_classes,
|
|
128
|
+
url=url,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
exposure_webhook_event_data_exposure.additional_properties = d
|
|
133
|
+
return exposure_webhook_event_data_exposure
|
|
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,136 @@
|
|
|
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
|
+
import datetime
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="ExposureWebhookEventDataInfection")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class ExposureWebhookEventDataInfection:
|
|
26
|
+
""" Only on infostealer.detected.
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
date_compromised (datetime.datetime | Unset):
|
|
30
|
+
computer_name (str | Unset):
|
|
31
|
+
operating_system (str | Unset):
|
|
32
|
+
ip (str | Unset): Masked by the source.
|
|
33
|
+
total_corporate_services (int | Unset):
|
|
34
|
+
total_user_services (int | Unset):
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
date_compromised: datetime.datetime | Unset = UNSET
|
|
38
|
+
computer_name: str | Unset = UNSET
|
|
39
|
+
operating_system: str | Unset = UNSET
|
|
40
|
+
ip: str | Unset = UNSET
|
|
41
|
+
total_corporate_services: int | Unset = UNSET
|
|
42
|
+
total_user_services: int | Unset = UNSET
|
|
43
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
date_compromised: str | Unset = UNSET
|
|
51
|
+
if not isinstance(self.date_compromised, Unset):
|
|
52
|
+
date_compromised = self.date_compromised.isoformat()
|
|
53
|
+
|
|
54
|
+
computer_name = self.computer_name
|
|
55
|
+
|
|
56
|
+
operating_system = self.operating_system
|
|
57
|
+
|
|
58
|
+
ip = self.ip
|
|
59
|
+
|
|
60
|
+
total_corporate_services = self.total_corporate_services
|
|
61
|
+
|
|
62
|
+
total_user_services = self.total_user_services
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
field_dict: dict[str, Any] = {}
|
|
66
|
+
field_dict.update(self.additional_properties)
|
|
67
|
+
field_dict.update({
|
|
68
|
+
})
|
|
69
|
+
if date_compromised is not UNSET:
|
|
70
|
+
field_dict["date_compromised"] = date_compromised
|
|
71
|
+
if computer_name is not UNSET:
|
|
72
|
+
field_dict["computer_name"] = computer_name
|
|
73
|
+
if operating_system is not UNSET:
|
|
74
|
+
field_dict["operating_system"] = operating_system
|
|
75
|
+
if ip is not UNSET:
|
|
76
|
+
field_dict["ip"] = ip
|
|
77
|
+
if total_corporate_services is not UNSET:
|
|
78
|
+
field_dict["total_corporate_services"] = total_corporate_services
|
|
79
|
+
if total_user_services is not UNSET:
|
|
80
|
+
field_dict["total_user_services"] = total_user_services
|
|
81
|
+
|
|
82
|
+
return field_dict
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
88
|
+
d = dict(src_dict)
|
|
89
|
+
_date_compromised = d.pop("date_compromised", UNSET)
|
|
90
|
+
date_compromised: datetime.datetime | Unset
|
|
91
|
+
if isinstance(_date_compromised, Unset):
|
|
92
|
+
date_compromised = UNSET
|
|
93
|
+
else:
|
|
94
|
+
date_compromised = datetime.datetime.fromisoformat(_date_compromised)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
computer_name = d.pop("computer_name", UNSET)
|
|
100
|
+
|
|
101
|
+
operating_system = d.pop("operating_system", UNSET)
|
|
102
|
+
|
|
103
|
+
ip = d.pop("ip", UNSET)
|
|
104
|
+
|
|
105
|
+
total_corporate_services = d.pop("total_corporate_services", UNSET)
|
|
106
|
+
|
|
107
|
+
total_user_services = d.pop("total_user_services", UNSET)
|
|
108
|
+
|
|
109
|
+
exposure_webhook_event_data_infection = cls(
|
|
110
|
+
date_compromised=date_compromised,
|
|
111
|
+
computer_name=computer_name,
|
|
112
|
+
operating_system=operating_system,
|
|
113
|
+
ip=ip,
|
|
114
|
+
total_corporate_services=total_corporate_services,
|
|
115
|
+
total_user_services=total_user_services,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
exposure_webhook_event_data_infection.additional_properties = d
|
|
120
|
+
return exposure_webhook_event_data_infection
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def additional_keys(self) -> list[str]:
|
|
124
|
+
return list(self.additional_properties.keys())
|
|
125
|
+
|
|
126
|
+
def __getitem__(self, key: str) -> Any:
|
|
127
|
+
return self.additional_properties[key]
|
|
128
|
+
|
|
129
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
130
|
+
self.additional_properties[key] = value
|
|
131
|
+
|
|
132
|
+
def __delitem__(self, key: str) -> None:
|
|
133
|
+
del self.additional_properties[key]
|
|
134
|
+
|
|
135
|
+
def __contains__(self, key: str) -> bool:
|
|
136
|
+
return key in self.additional_properties
|