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,87 @@
|
|
|
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="EventAsset")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class EventAsset:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
type_ (str | Unset):
|
|
27
|
+
identifier (str | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type_: str | Unset = UNSET
|
|
31
|
+
identifier: str | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
type_ = self.type_
|
|
40
|
+
|
|
41
|
+
identifier = self.identifier
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({
|
|
47
|
+
})
|
|
48
|
+
if type_ is not UNSET:
|
|
49
|
+
field_dict["type"] = type_
|
|
50
|
+
if identifier is not UNSET:
|
|
51
|
+
field_dict["identifier"] = identifier
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
type_ = d.pop("type", UNSET)
|
|
61
|
+
|
|
62
|
+
identifier = d.pop("identifier", UNSET)
|
|
63
|
+
|
|
64
|
+
event_asset = cls(
|
|
65
|
+
type_=type_,
|
|
66
|
+
identifier=identifier,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
event_asset.additional_properties = d
|
|
71
|
+
return event_asset
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,146 @@
|
|
|
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.event_ingest_asset import EventIngestAsset
|
|
16
|
+
from ..models.event_ingest_evidence import EventIngestEvidence
|
|
17
|
+
from ..models.event_ingest_source import EventIngestSource
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
T = TypeVar("T", bound="EventIngest")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@_attrs_define
|
|
28
|
+
class EventIngest:
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
signal_type (str): Example: credential_leak.
|
|
32
|
+
asset (EventIngestAsset):
|
|
33
|
+
source (EventIngestSource | Unset):
|
|
34
|
+
confidence (float | Unset):
|
|
35
|
+
evidence (EventIngestEvidence | Unset):
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
signal_type: str
|
|
39
|
+
asset: EventIngestAsset
|
|
40
|
+
source: EventIngestSource | Unset = UNSET
|
|
41
|
+
confidence: float | Unset = UNSET
|
|
42
|
+
evidence: EventIngestEvidence | 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.event_ingest_asset import EventIngestAsset # noqa: PLC0415
|
|
51
|
+
from ..models.event_ingest_evidence import EventIngestEvidence # noqa: PLC0415
|
|
52
|
+
from ..models.event_ingest_source import EventIngestSource # noqa: PLC0415
|
|
53
|
+
signal_type = self.signal_type
|
|
54
|
+
|
|
55
|
+
asset = self.asset.to_dict()
|
|
56
|
+
|
|
57
|
+
source: dict[str, Any] | Unset = UNSET
|
|
58
|
+
if not isinstance(self.source, Unset):
|
|
59
|
+
source = self.source.to_dict()
|
|
60
|
+
|
|
61
|
+
confidence = self.confidence
|
|
62
|
+
|
|
63
|
+
evidence: dict[str, Any] | Unset = UNSET
|
|
64
|
+
if not isinstance(self.evidence, Unset):
|
|
65
|
+
evidence = self.evidence.to_dict()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
field_dict: dict[str, Any] = {}
|
|
69
|
+
field_dict.update(self.additional_properties)
|
|
70
|
+
field_dict.update({
|
|
71
|
+
"signal_type": signal_type,
|
|
72
|
+
"asset": asset,
|
|
73
|
+
})
|
|
74
|
+
if source is not UNSET:
|
|
75
|
+
field_dict["source"] = source
|
|
76
|
+
if confidence is not UNSET:
|
|
77
|
+
field_dict["confidence"] = confidence
|
|
78
|
+
if evidence is not UNSET:
|
|
79
|
+
field_dict["evidence"] = evidence
|
|
80
|
+
|
|
81
|
+
return field_dict
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
87
|
+
from ..models.event_ingest_asset import EventIngestAsset # noqa: PLC0415
|
|
88
|
+
from ..models.event_ingest_evidence import EventIngestEvidence # noqa: PLC0415
|
|
89
|
+
from ..models.event_ingest_source import EventIngestSource # noqa: PLC0415
|
|
90
|
+
d = dict(src_dict)
|
|
91
|
+
signal_type = d.pop("signal_type")
|
|
92
|
+
|
|
93
|
+
asset = EventIngestAsset.from_dict(d.pop("asset"))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
_source = d.pop("source", UNSET)
|
|
99
|
+
source: EventIngestSource | Unset
|
|
100
|
+
if isinstance(_source, Unset):
|
|
101
|
+
source = UNSET
|
|
102
|
+
else:
|
|
103
|
+
source = EventIngestSource.from_dict(_source)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
confidence = d.pop("confidence", UNSET)
|
|
109
|
+
|
|
110
|
+
_evidence = d.pop("evidence", UNSET)
|
|
111
|
+
evidence: EventIngestEvidence | Unset
|
|
112
|
+
if isinstance(_evidence, Unset):
|
|
113
|
+
evidence = UNSET
|
|
114
|
+
else:
|
|
115
|
+
evidence = EventIngestEvidence.from_dict(_evidence)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
event_ingest = cls(
|
|
121
|
+
signal_type=signal_type,
|
|
122
|
+
asset=asset,
|
|
123
|
+
source=source,
|
|
124
|
+
confidence=confidence,
|
|
125
|
+
evidence=evidence,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
event_ingest.additional_properties = d
|
|
130
|
+
return event_ingest
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def additional_keys(self) -> list[str]:
|
|
134
|
+
return list(self.additional_properties.keys())
|
|
135
|
+
|
|
136
|
+
def __getitem__(self, key: str) -> Any:
|
|
137
|
+
return self.additional_properties[key]
|
|
138
|
+
|
|
139
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
140
|
+
self.additional_properties[key] = value
|
|
141
|
+
|
|
142
|
+
def __delitem__(self, key: str) -> None:
|
|
143
|
+
del self.additional_properties[key]
|
|
144
|
+
|
|
145
|
+
def __contains__(self, key: str) -> bool:
|
|
146
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,87 @@
|
|
|
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="EventIngestAsset")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class EventIngestAsset:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
type_ (str | Unset): Example: domain.
|
|
27
|
+
identifier (str | Unset): Example: example.com.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type_: str | Unset = UNSET
|
|
31
|
+
identifier: str | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
type_ = self.type_
|
|
40
|
+
|
|
41
|
+
identifier = self.identifier
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({
|
|
47
|
+
})
|
|
48
|
+
if type_ is not UNSET:
|
|
49
|
+
field_dict["type"] = type_
|
|
50
|
+
if identifier is not UNSET:
|
|
51
|
+
field_dict["identifier"] = identifier
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
type_ = d.pop("type", UNSET)
|
|
61
|
+
|
|
62
|
+
identifier = d.pop("identifier", UNSET)
|
|
63
|
+
|
|
64
|
+
event_ingest_asset = cls(
|
|
65
|
+
type_=type_,
|
|
66
|
+
identifier=identifier,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
event_ingest_asset.additional_properties = d
|
|
71
|
+
return event_ingest_asset
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="EventIngestEvidence")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class EventIngestEvidence:
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
|
|
36
|
+
return field_dict
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
event_ingest_evidence = cls(
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
event_ingest_evidence.additional_properties = d
|
|
48
|
+
return event_ingest_evidence
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def additional_keys(self) -> list[str]:
|
|
52
|
+
return list(self.additional_properties.keys())
|
|
53
|
+
|
|
54
|
+
def __getitem__(self, key: str) -> Any:
|
|
55
|
+
return self.additional_properties[key]
|
|
56
|
+
|
|
57
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
58
|
+
self.additional_properties[key] = value
|
|
59
|
+
|
|
60
|
+
def __delitem__(self, key: str) -> None:
|
|
61
|
+
del self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __contains__(self, key: str) -> bool:
|
|
64
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,87 @@
|
|
|
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="EventIngestSource")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class EventIngestSource:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
type_ (str | Unset):
|
|
27
|
+
url (str | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type_: str | Unset = UNSET
|
|
31
|
+
url: str | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
type_ = self.type_
|
|
40
|
+
|
|
41
|
+
url = self.url
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({
|
|
47
|
+
})
|
|
48
|
+
if type_ is not UNSET:
|
|
49
|
+
field_dict["type"] = type_
|
|
50
|
+
if url is not UNSET:
|
|
51
|
+
field_dict["url"] = url
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
type_ = d.pop("type", UNSET)
|
|
61
|
+
|
|
62
|
+
url = d.pop("url", UNSET)
|
|
63
|
+
|
|
64
|
+
event_ingest_source = cls(
|
|
65
|
+
type_=type_,
|
|
66
|
+
url=url,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
event_ingest_source.additional_properties = d
|
|
71
|
+
return event_ingest_source
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
kalir/models/exposure.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
from uuid import UUID
|
|
14
|
+
import datetime
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="Exposure")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class Exposure:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
exposure_id (UUID | Unset):
|
|
30
|
+
identifier (str | Unset):
|
|
31
|
+
kind (str | Unset):
|
|
32
|
+
status (str | Unset):
|
|
33
|
+
detected_at (datetime.datetime | Unset):
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
exposure_id: UUID | Unset = UNSET
|
|
37
|
+
identifier: str | Unset = UNSET
|
|
38
|
+
kind: str | Unset = UNSET
|
|
39
|
+
status: str | Unset = UNSET
|
|
40
|
+
detected_at: datetime.datetime | Unset = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
exposure_id: str | Unset = UNSET
|
|
49
|
+
if not isinstance(self.exposure_id, Unset):
|
|
50
|
+
exposure_id = str(self.exposure_id)
|
|
51
|
+
|
|
52
|
+
identifier = self.identifier
|
|
53
|
+
|
|
54
|
+
kind = self.kind
|
|
55
|
+
|
|
56
|
+
status = self.status
|
|
57
|
+
|
|
58
|
+
detected_at: str | Unset = UNSET
|
|
59
|
+
if not isinstance(self.detected_at, Unset):
|
|
60
|
+
detected_at = self.detected_at.isoformat()
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
field_dict: dict[str, Any] = {}
|
|
64
|
+
field_dict.update(self.additional_properties)
|
|
65
|
+
field_dict.update({
|
|
66
|
+
})
|
|
67
|
+
if exposure_id is not UNSET:
|
|
68
|
+
field_dict["exposure_id"] = exposure_id
|
|
69
|
+
if identifier is not UNSET:
|
|
70
|
+
field_dict["identifier"] = identifier
|
|
71
|
+
if kind is not UNSET:
|
|
72
|
+
field_dict["kind"] = kind
|
|
73
|
+
if status is not UNSET:
|
|
74
|
+
field_dict["status"] = status
|
|
75
|
+
if detected_at is not UNSET:
|
|
76
|
+
field_dict["detected_at"] = detected_at
|
|
77
|
+
|
|
78
|
+
return field_dict
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
84
|
+
d = dict(src_dict)
|
|
85
|
+
_exposure_id = d.pop("exposure_id", UNSET)
|
|
86
|
+
exposure_id: UUID | Unset
|
|
87
|
+
if isinstance(_exposure_id, Unset):
|
|
88
|
+
exposure_id = UNSET
|
|
89
|
+
else:
|
|
90
|
+
exposure_id = UUID(_exposure_id)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
identifier = d.pop("identifier", UNSET)
|
|
96
|
+
|
|
97
|
+
kind = d.pop("kind", UNSET)
|
|
98
|
+
|
|
99
|
+
status = d.pop("status", UNSET)
|
|
100
|
+
|
|
101
|
+
_detected_at = d.pop("detected_at", UNSET)
|
|
102
|
+
detected_at: datetime.datetime | Unset
|
|
103
|
+
if isinstance(_detected_at, Unset):
|
|
104
|
+
detected_at = UNSET
|
|
105
|
+
else:
|
|
106
|
+
detected_at = datetime.datetime.fromisoformat(_detected_at)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
exposure = cls(
|
|
112
|
+
exposure_id=exposure_id,
|
|
113
|
+
identifier=identifier,
|
|
114
|
+
kind=kind,
|
|
115
|
+
status=status,
|
|
116
|
+
detected_at=detected_at,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
exposure.additional_properties = d
|
|
121
|
+
return exposure
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def additional_keys(self) -> list[str]:
|
|
125
|
+
return list(self.additional_properties.keys())
|
|
126
|
+
|
|
127
|
+
def __getitem__(self, key: str) -> Any:
|
|
128
|
+
return self.additional_properties[key]
|
|
129
|
+
|
|
130
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
131
|
+
self.additional_properties[key] = value
|
|
132
|
+
|
|
133
|
+
def __delitem__(self, key: str) -> None:
|
|
134
|
+
del self.additional_properties[key]
|
|
135
|
+
|
|
136
|
+
def __contains__(self, key: str) -> bool:
|
|
137
|
+
return key in self.additional_properties
|