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,134 @@
|
|
|
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.rule_input_actions_item import RuleInputActionsItem
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="RuleInput")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class RuleInput:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
name (str):
|
|
30
|
+
condition (str): CEL expression.
|
|
31
|
+
description (str | Unset):
|
|
32
|
+
actions (list[RuleInputActionsItem] | Unset):
|
|
33
|
+
enabled (bool | Unset): Default: True.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
name: str
|
|
37
|
+
condition: str
|
|
38
|
+
description: str | Unset = UNSET
|
|
39
|
+
actions: list[RuleInputActionsItem] | Unset = UNSET
|
|
40
|
+
enabled: bool | Unset = True
|
|
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
|
+
from ..models.rule_input_actions_item import RuleInputActionsItem # noqa: PLC0415
|
|
49
|
+
name = self.name
|
|
50
|
+
|
|
51
|
+
condition = self.condition
|
|
52
|
+
|
|
53
|
+
description = self.description
|
|
54
|
+
|
|
55
|
+
actions: list[dict[str, Any]] | Unset = UNSET
|
|
56
|
+
if not isinstance(self.actions, Unset):
|
|
57
|
+
actions = []
|
|
58
|
+
for actions_item_data in self.actions:
|
|
59
|
+
actions_item = actions_item_data.to_dict()
|
|
60
|
+
actions.append(actions_item)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
enabled = self.enabled
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
field_dict: dict[str, Any] = {}
|
|
68
|
+
field_dict.update(self.additional_properties)
|
|
69
|
+
field_dict.update({
|
|
70
|
+
"name": name,
|
|
71
|
+
"condition": condition,
|
|
72
|
+
})
|
|
73
|
+
if description is not UNSET:
|
|
74
|
+
field_dict["description"] = description
|
|
75
|
+
if actions is not UNSET:
|
|
76
|
+
field_dict["actions"] = actions
|
|
77
|
+
if enabled is not UNSET:
|
|
78
|
+
field_dict["enabled"] = enabled
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
from ..models.rule_input_actions_item import RuleInputActionsItem # noqa: PLC0415
|
|
87
|
+
d = dict(src_dict)
|
|
88
|
+
name = d.pop("name")
|
|
89
|
+
|
|
90
|
+
condition = d.pop("condition")
|
|
91
|
+
|
|
92
|
+
description = d.pop("description", UNSET)
|
|
93
|
+
|
|
94
|
+
_actions = d.pop("actions", UNSET)
|
|
95
|
+
actions: list[RuleInputActionsItem] | Unset = UNSET
|
|
96
|
+
if _actions is not UNSET:
|
|
97
|
+
actions = []
|
|
98
|
+
for actions_item_data in _actions:
|
|
99
|
+
actions_item = RuleInputActionsItem.from_dict(actions_item_data)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
actions.append(actions_item)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
enabled = d.pop("enabled", UNSET)
|
|
107
|
+
|
|
108
|
+
rule_input = cls(
|
|
109
|
+
name=name,
|
|
110
|
+
condition=condition,
|
|
111
|
+
description=description,
|
|
112
|
+
actions=actions,
|
|
113
|
+
enabled=enabled,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
rule_input.additional_properties = d
|
|
118
|
+
return rule_input
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def additional_keys(self) -> list[str]:
|
|
122
|
+
return list(self.additional_properties.keys())
|
|
123
|
+
|
|
124
|
+
def __getitem__(self, key: str) -> Any:
|
|
125
|
+
return self.additional_properties[key]
|
|
126
|
+
|
|
127
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
128
|
+
self.additional_properties[key] = value
|
|
129
|
+
|
|
130
|
+
def __delitem__(self, key: str) -> None:
|
|
131
|
+
del self.additional_properties[key]
|
|
132
|
+
|
|
133
|
+
def __contains__(self, key: str) -> bool:
|
|
134
|
+
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="RuleInputActionsItem")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class RuleInputActionsItem:
|
|
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
|
+
rule_input_actions_item = cls(
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
rule_input_actions_item.additional_properties = d
|
|
48
|
+
return rule_input_actions_item
|
|
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
|
kalir/models/takedown.py
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
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="Takedown")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class Takedown:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
takedown_type (str):
|
|
30
|
+
target_domain (str | Unset):
|
|
31
|
+
target_url (str | Unset):
|
|
32
|
+
priority (str | Unset):
|
|
33
|
+
notes (str | Unset):
|
|
34
|
+
takedown_id (UUID | Unset):
|
|
35
|
+
status (str | Unset):
|
|
36
|
+
created_at (datetime.datetime | Unset):
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
takedown_type: str
|
|
40
|
+
target_domain: str | Unset = UNSET
|
|
41
|
+
target_url: str | Unset = UNSET
|
|
42
|
+
priority: str | Unset = UNSET
|
|
43
|
+
notes: str | Unset = UNSET
|
|
44
|
+
takedown_id: UUID | Unset = UNSET
|
|
45
|
+
status: str | Unset = UNSET
|
|
46
|
+
created_at: datetime.datetime | Unset = UNSET
|
|
47
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict[str, Any]:
|
|
54
|
+
takedown_type = self.takedown_type
|
|
55
|
+
|
|
56
|
+
target_domain = self.target_domain
|
|
57
|
+
|
|
58
|
+
target_url = self.target_url
|
|
59
|
+
|
|
60
|
+
priority = self.priority
|
|
61
|
+
|
|
62
|
+
notes = self.notes
|
|
63
|
+
|
|
64
|
+
takedown_id: str | Unset = UNSET
|
|
65
|
+
if not isinstance(self.takedown_id, Unset):
|
|
66
|
+
takedown_id = str(self.takedown_id)
|
|
67
|
+
|
|
68
|
+
status = self.status
|
|
69
|
+
|
|
70
|
+
created_at: str | Unset = UNSET
|
|
71
|
+
if not isinstance(self.created_at, Unset):
|
|
72
|
+
created_at = self.created_at.isoformat()
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
field_dict: dict[str, Any] = {}
|
|
76
|
+
field_dict.update(self.additional_properties)
|
|
77
|
+
field_dict.update({
|
|
78
|
+
"takedown_type": takedown_type,
|
|
79
|
+
})
|
|
80
|
+
if target_domain is not UNSET:
|
|
81
|
+
field_dict["target_domain"] = target_domain
|
|
82
|
+
if target_url is not UNSET:
|
|
83
|
+
field_dict["target_url"] = target_url
|
|
84
|
+
if priority is not UNSET:
|
|
85
|
+
field_dict["priority"] = priority
|
|
86
|
+
if notes is not UNSET:
|
|
87
|
+
field_dict["notes"] = notes
|
|
88
|
+
if takedown_id is not UNSET:
|
|
89
|
+
field_dict["takedown_id"] = takedown_id
|
|
90
|
+
if status is not UNSET:
|
|
91
|
+
field_dict["status"] = status
|
|
92
|
+
if created_at is not UNSET:
|
|
93
|
+
field_dict["created_at"] = created_at
|
|
94
|
+
|
|
95
|
+
return field_dict
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
101
|
+
d = dict(src_dict)
|
|
102
|
+
takedown_type = d.pop("takedown_type")
|
|
103
|
+
|
|
104
|
+
target_domain = d.pop("target_domain", UNSET)
|
|
105
|
+
|
|
106
|
+
target_url = d.pop("target_url", UNSET)
|
|
107
|
+
|
|
108
|
+
priority = d.pop("priority", UNSET)
|
|
109
|
+
|
|
110
|
+
notes = d.pop("notes", UNSET)
|
|
111
|
+
|
|
112
|
+
_takedown_id = d.pop("takedown_id", UNSET)
|
|
113
|
+
takedown_id: UUID | Unset
|
|
114
|
+
if isinstance(_takedown_id, Unset):
|
|
115
|
+
takedown_id = UNSET
|
|
116
|
+
else:
|
|
117
|
+
takedown_id = UUID(_takedown_id)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
status = d.pop("status", UNSET)
|
|
123
|
+
|
|
124
|
+
_created_at = d.pop("created_at", UNSET)
|
|
125
|
+
created_at: datetime.datetime | Unset
|
|
126
|
+
if isinstance(_created_at, Unset):
|
|
127
|
+
created_at = UNSET
|
|
128
|
+
else:
|
|
129
|
+
created_at = datetime.datetime.fromisoformat(_created_at)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
takedown = cls(
|
|
135
|
+
takedown_type=takedown_type,
|
|
136
|
+
target_domain=target_domain,
|
|
137
|
+
target_url=target_url,
|
|
138
|
+
priority=priority,
|
|
139
|
+
notes=notes,
|
|
140
|
+
takedown_id=takedown_id,
|
|
141
|
+
status=status,
|
|
142
|
+
created_at=created_at,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
takedown.additional_properties = d
|
|
147
|
+
return takedown
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def additional_keys(self) -> list[str]:
|
|
151
|
+
return list(self.additional_properties.keys())
|
|
152
|
+
|
|
153
|
+
def __getitem__(self, key: str) -> Any:
|
|
154
|
+
return self.additional_properties[key]
|
|
155
|
+
|
|
156
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
157
|
+
self.additional_properties[key] = value
|
|
158
|
+
|
|
159
|
+
def __delitem__(self, key: str) -> None:
|
|
160
|
+
del self.additional_properties[key]
|
|
161
|
+
|
|
162
|
+
def __contains__(self, key: str) -> bool:
|
|
163
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,113 @@
|
|
|
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="TakedownCreate")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class TakedownCreate:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
takedown_type (str):
|
|
27
|
+
target_domain (str | Unset):
|
|
28
|
+
target_url (str | Unset):
|
|
29
|
+
priority (str | Unset):
|
|
30
|
+
notes (str | Unset):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
takedown_type: str
|
|
34
|
+
target_domain: str | Unset = UNSET
|
|
35
|
+
target_url: str | Unset = UNSET
|
|
36
|
+
priority: str | Unset = UNSET
|
|
37
|
+
notes: str | Unset = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
takedown_type = self.takedown_type
|
|
46
|
+
|
|
47
|
+
target_domain = self.target_domain
|
|
48
|
+
|
|
49
|
+
target_url = self.target_url
|
|
50
|
+
|
|
51
|
+
priority = self.priority
|
|
52
|
+
|
|
53
|
+
notes = self.notes
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update({
|
|
59
|
+
"takedown_type": takedown_type,
|
|
60
|
+
})
|
|
61
|
+
if target_domain is not UNSET:
|
|
62
|
+
field_dict["target_domain"] = target_domain
|
|
63
|
+
if target_url is not UNSET:
|
|
64
|
+
field_dict["target_url"] = target_url
|
|
65
|
+
if priority is not UNSET:
|
|
66
|
+
field_dict["priority"] = priority
|
|
67
|
+
if notes is not UNSET:
|
|
68
|
+
field_dict["notes"] = notes
|
|
69
|
+
|
|
70
|
+
return field_dict
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
76
|
+
d = dict(src_dict)
|
|
77
|
+
takedown_type = d.pop("takedown_type")
|
|
78
|
+
|
|
79
|
+
target_domain = d.pop("target_domain", UNSET)
|
|
80
|
+
|
|
81
|
+
target_url = d.pop("target_url", UNSET)
|
|
82
|
+
|
|
83
|
+
priority = d.pop("priority", UNSET)
|
|
84
|
+
|
|
85
|
+
notes = d.pop("notes", UNSET)
|
|
86
|
+
|
|
87
|
+
takedown_create = cls(
|
|
88
|
+
takedown_type=takedown_type,
|
|
89
|
+
target_domain=target_domain,
|
|
90
|
+
target_url=target_url,
|
|
91
|
+
priority=priority,
|
|
92
|
+
notes=notes,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
takedown_create.additional_properties = d
|
|
97
|
+
return takedown_create
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def additional_keys(self) -> list[str]:
|
|
101
|
+
return list(self.additional_properties.keys())
|
|
102
|
+
|
|
103
|
+
def __getitem__(self, key: str) -> Any:
|
|
104
|
+
return self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
107
|
+
self.additional_properties[key] = value
|
|
108
|
+
|
|
109
|
+
def __delitem__(self, key: str) -> None:
|
|
110
|
+
del self.additional_properties[key]
|
|
111
|
+
|
|
112
|
+
def __contains__(self, key: str) -> bool:
|
|
113
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,96 @@
|
|
|
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="TakedownUpdate")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class TakedownUpdate:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
status (str | Unset):
|
|
27
|
+
priority (str | Unset):
|
|
28
|
+
notes (str | Unset):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
status: str | Unset = UNSET
|
|
32
|
+
priority: str | Unset = UNSET
|
|
33
|
+
notes: str | Unset = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
status = self.status
|
|
42
|
+
|
|
43
|
+
priority = self.priority
|
|
44
|
+
|
|
45
|
+
notes = self.notes
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
field_dict: dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update({
|
|
51
|
+
})
|
|
52
|
+
if status is not UNSET:
|
|
53
|
+
field_dict["status"] = status
|
|
54
|
+
if priority is not UNSET:
|
|
55
|
+
field_dict["priority"] = priority
|
|
56
|
+
if notes is not UNSET:
|
|
57
|
+
field_dict["notes"] = notes
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
65
|
+
d = dict(src_dict)
|
|
66
|
+
status = d.pop("status", UNSET)
|
|
67
|
+
|
|
68
|
+
priority = d.pop("priority", UNSET)
|
|
69
|
+
|
|
70
|
+
notes = d.pop("notes", UNSET)
|
|
71
|
+
|
|
72
|
+
takedown_update = cls(
|
|
73
|
+
status=status,
|
|
74
|
+
priority=priority,
|
|
75
|
+
notes=notes,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
takedown_update.additional_properties = d
|
|
80
|
+
return takedown_update
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def additional_keys(self) -> list[str]:
|
|
84
|
+
return list(self.additional_properties.keys())
|
|
85
|
+
|
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
|
87
|
+
return self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
90
|
+
self.additional_properties[key] = value
|
|
91
|
+
|
|
92
|
+
def __delitem__(self, key: str) -> None:
|
|
93
|
+
del self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __contains__(self, key: str) -> bool:
|
|
96
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
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.update_incident_status_body_status import UpdateIncidentStatusBodyStatus
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="UpdateIncidentStatusBody")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class UpdateIncidentStatusBody:
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
status (UpdateIncidentStatusBodyStatus):
|
|
28
|
+
note (str | Unset): Optional human-readable note attached to the status change.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
status: UpdateIncidentStatusBodyStatus
|
|
32
|
+
note: str | Unset = UNSET
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
status = self.status.value
|
|
41
|
+
|
|
42
|
+
note = self.note
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update({
|
|
48
|
+
"status": status,
|
|
49
|
+
})
|
|
50
|
+
if note is not UNSET:
|
|
51
|
+
field_dict["note"] = note
|
|
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
|
+
status = UpdateIncidentStatusBodyStatus(d.pop("status"))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
note = d.pop("note", UNSET)
|
|
66
|
+
|
|
67
|
+
update_incident_status_body = cls(
|
|
68
|
+
status=status,
|
|
69
|
+
note=note,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
update_incident_status_body.additional_properties = d
|
|
74
|
+
return update_incident_status_body
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|