aceapi-v2-client 2.0.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.
- aceapi_v2_client/__init__.py +8 -0
- aceapi_v2_client/api/__init__.py +1 -0
- aceapi_v2_client/api/alerts/__init__.py +1 -0
- aceapi_v2_client/api/alerts/bulk_add_observable_alerts_bulk_add_observable_post.py +174 -0
- aceapi_v2_client/api/alerts/download_alert_alerts_alert_uuid_download_get.py +167 -0
- aceapi_v2_client/api/alerts/view_alert_logs_alerts_alert_uuid_logs_get.py +200 -0
- aceapi_v2_client/api/authentication/__init__.py +1 -0
- aceapi_v2_client/api/authentication/login_for_access_token_auth_token_post.py +187 -0
- aceapi_v2_client/api/authentication/refresh_access_token_auth_refresh_post.py +182 -0
- aceapi_v2_client/api/common/__init__.py +1 -0
- aceapi_v2_client/api/common/ping_common_ping_get.py +128 -0
- aceapi_v2_client/api/common/supported_api_version_common_supported_api_version_get.py +128 -0
- aceapi_v2_client/api/common/valid_companies_common_valid_companies_get.py +128 -0
- aceapi_v2_client/api/common/valid_directives_common_valid_directives_get.py +130 -0
- aceapi_v2_client/api/common/valid_observables_common_valid_observables_get.py +130 -0
- aceapi_v2_client/api/events/__init__.py +1 -0
- aceapi_v2_client/api/events/export_events_events_export_get.py +192 -0
- aceapi_v2_client/api/events/open_events_events_open_get.py +128 -0
- aceapi_v2_client/api/events/update_event_status_events_event_id_patch.py +182 -0
- aceapi_v2_client/api/health/__init__.py +1 -0
- aceapi_v2_client/api/health/ping_health_ping_get.py +136 -0
- aceapi_v2_client/api/nodes/__init__.py +1 -0
- aceapi_v2_client/api/nodes/drain_node_nodes_node_id_drain_post.py +173 -0
- aceapi_v2_client/api/nodes/get_node_nodes_node_id_get.py +161 -0
- aceapi_v2_client/api/nodes/list_nodes_nodes_get.py +128 -0
- aceapi_v2_client/api/nodes/resume_node_nodes_node_id_resume_post.py +169 -0
- aceapi_v2_client/api/observables/__init__.py +1 -0
- aceapi_v2_client/api/observables/create_comment_observable_comments_post.py +166 -0
- aceapi_v2_client/api/observables/delete_comment_observable_comments_comment_id_delete.py +159 -0
- aceapi_v2_client/api/observables/list_comments_observable_comments_observable_id_get.py +163 -0
- aceapi_v2_client/api/observables/list_observable_types_observable_types_get.py +144 -0
- aceapi_v2_client/api/observables/set_interesting_observables_interesting_patch.py +191 -0
- aceapi_v2_client/api/observables/update_comment_observable_comments_comment_id_patch.py +182 -0
- aceapi_v2_client/api/threats/__init__.py +1 -0
- aceapi_v2_client/api/threats/create_threat_threats_post.py +166 -0
- aceapi_v2_client/api/threats/create_threat_type_threat_types_post.py +166 -0
- aceapi_v2_client/api/threats/delete_threat_threats_delete.py +179 -0
- aceapi_v2_client/api/threats/delete_threat_type_threat_types_threat_type_id_delete.py +159 -0
- aceapi_v2_client/api/threats/get_threat_type_threat_types_threat_type_id_get.py +161 -0
- aceapi_v2_client/api/threats/list_threat_types_threat_types_get.py +128 -0
- aceapi_v2_client/api/threats/list_threats_threats_get.py +171 -0
- aceapi_v2_client/api/threats/update_threat_type_threat_types_threat_type_id_patch.py +182 -0
- aceapi_v2_client/auth.py +56 -0
- aceapi_v2_client/client.py +282 -0
- aceapi_v2_client/errors.py +16 -0
- aceapi_v2_client/models/__init__.py +87 -0
- aceapi_v2_client/models/body_login_for_access_token_auth_token_post.py +140 -0
- aceapi_v2_client/models/bulk_add_observable_request.py +110 -0
- aceapi_v2_client/models/bulk_add_observable_result.py +107 -0
- aceapi_v2_client/models/bulk_add_observable_result_failed_details.py +47 -0
- aceapi_v2_client/models/collector_status_read.py +86 -0
- aceapi_v2_client/models/company_read.py +69 -0
- aceapi_v2_client/models/event_read.py +84 -0
- aceapi_v2_client/models/export_format.py +8 -0
- aceapi_v2_client/models/health_response.py +62 -0
- aceapi_v2_client/models/http_validation_error.py +79 -0
- aceapi_v2_client/models/list_response_company_read.py +75 -0
- aceapi_v2_client/models/list_response_event_read.py +75 -0
- aceapi_v2_client/models/list_response_named_description_read.py +75 -0
- aceapi_v2_client/models/list_response_node_read.py +75 -0
- aceapi_v2_client/models/list_response_observable_comment_read.py +75 -0
- aceapi_v2_client/models/list_response_observable_type_read.py +75 -0
- aceapi_v2_client/models/list_response_threat_read.py +75 -0
- aceapi_v2_client/models/list_response_threat_type_read.py +75 -0
- aceapi_v2_client/models/named_description_read.py +69 -0
- aceapi_v2_client/models/node_read.py +163 -0
- aceapi_v2_client/models/observable_comment_create.py +77 -0
- aceapi_v2_client/models/observable_comment_read.py +102 -0
- aceapi_v2_client/models/observable_comment_update.py +61 -0
- aceapi_v2_client/models/observable_type_read.py +62 -0
- aceapi_v2_client/models/ping_response.py +61 -0
- aceapi_v2_client/models/refresh_request.py +62 -0
- aceapi_v2_client/models/set_interesting_observables_interesting_patch_response_set_interesting_observables_interesting_patch.py +50 -0
- aceapi_v2_client/models/set_interesting_request.py +77 -0
- aceapi_v2_client/models/status_update.py +62 -0
- aceapi_v2_client/models/supported_api_version_response.py +61 -0
- aceapi_v2_client/models/threat_create.py +69 -0
- aceapi_v2_client/models/threat_read.py +77 -0
- aceapi_v2_client/models/threat_type_create.py +61 -0
- aceapi_v2_client/models/threat_type_read.py +69 -0
- aceapi_v2_client/models/threat_type_update.py +73 -0
- aceapi_v2_client/models/token.py +81 -0
- aceapi_v2_client/models/validation_error.py +123 -0
- aceapi_v2_client/models/validation_error_context.py +47 -0
- aceapi_v2_client/py.typed +0 -0
- aceapi_v2_client/types.py +54 -0
- aceapi_v2_client-2.0.0.dist-info/METADATA +192 -0
- aceapi_v2_client-2.0.0.dist-info/RECORD +90 -0
- aceapi_v2_client-2.0.0.dist-info/WHEEL +4 -0
- aceapi_v2_client-2.0.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
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
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.bulk_add_observable_result_failed_details import (
|
|
13
|
+
BulkAddObservableResultFailedDetails,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="BulkAddObservableResult")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class BulkAddObservableResult:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
success_count (int):
|
|
25
|
+
failed_count (int):
|
|
26
|
+
failed_uuids (list[str]):
|
|
27
|
+
failed_details (BulkAddObservableResultFailedDetails | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
success_count: int
|
|
31
|
+
failed_count: int
|
|
32
|
+
failed_uuids: list[str]
|
|
33
|
+
failed_details: BulkAddObservableResultFailedDetails | Unset = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
success_count = self.success_count
|
|
38
|
+
|
|
39
|
+
failed_count = self.failed_count
|
|
40
|
+
|
|
41
|
+
failed_uuids = self.failed_uuids
|
|
42
|
+
|
|
43
|
+
failed_details: dict[str, Any] | Unset = UNSET
|
|
44
|
+
if not isinstance(self.failed_details, Unset):
|
|
45
|
+
failed_details = self.failed_details.to_dict()
|
|
46
|
+
|
|
47
|
+
field_dict: dict[str, Any] = {}
|
|
48
|
+
field_dict.update(self.additional_properties)
|
|
49
|
+
field_dict.update(
|
|
50
|
+
{
|
|
51
|
+
"success_count": success_count,
|
|
52
|
+
"failed_count": failed_count,
|
|
53
|
+
"failed_uuids": failed_uuids,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
if failed_details is not UNSET:
|
|
57
|
+
field_dict["failed_details"] = failed_details
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
63
|
+
from ..models.bulk_add_observable_result_failed_details import (
|
|
64
|
+
BulkAddObservableResultFailedDetails,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
d = dict(src_dict)
|
|
68
|
+
success_count = d.pop("success_count")
|
|
69
|
+
|
|
70
|
+
failed_count = d.pop("failed_count")
|
|
71
|
+
|
|
72
|
+
failed_uuids = cast(list[str], d.pop("failed_uuids"))
|
|
73
|
+
|
|
74
|
+
_failed_details = d.pop("failed_details", UNSET)
|
|
75
|
+
failed_details: BulkAddObservableResultFailedDetails | Unset
|
|
76
|
+
if isinstance(_failed_details, Unset):
|
|
77
|
+
failed_details = UNSET
|
|
78
|
+
else:
|
|
79
|
+
failed_details = BulkAddObservableResultFailedDetails.from_dict(
|
|
80
|
+
_failed_details
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
bulk_add_observable_result = cls(
|
|
84
|
+
success_count=success_count,
|
|
85
|
+
failed_count=failed_count,
|
|
86
|
+
failed_uuids=failed_uuids,
|
|
87
|
+
failed_details=failed_details,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
bulk_add_observable_result.additional_properties = d
|
|
91
|
+
return bulk_add_observable_result
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def additional_keys(self) -> list[str]:
|
|
95
|
+
return list(self.additional_properties.keys())
|
|
96
|
+
|
|
97
|
+
def __getitem__(self, key: str) -> Any:
|
|
98
|
+
return self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
+
self.additional_properties[key] = value
|
|
102
|
+
|
|
103
|
+
def __delitem__(self, key: str) -> None:
|
|
104
|
+
del self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __contains__(self, key: str) -> bool:
|
|
107
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="BulkAddObservableResultFailedDetails")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class BulkAddObservableResultFailedDetails:
|
|
14
|
+
""" """
|
|
15
|
+
|
|
16
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
field_dict: dict[str, Any] = {}
|
|
21
|
+
field_dict.update(self.additional_properties)
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
bulk_add_observable_result_failed_details = cls()
|
|
29
|
+
|
|
30
|
+
bulk_add_observable_result_failed_details.additional_properties = d
|
|
31
|
+
return bulk_add_observable_result_failed_details
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def additional_keys(self) -> list[str]:
|
|
35
|
+
return list(self.additional_properties.keys())
|
|
36
|
+
|
|
37
|
+
def __getitem__(self, key: str) -> str:
|
|
38
|
+
return self.additional_properties[key]
|
|
39
|
+
|
|
40
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
41
|
+
self.additional_properties[key] = value
|
|
42
|
+
|
|
43
|
+
def __delitem__(self, key: str) -> None:
|
|
44
|
+
del self.additional_properties[key]
|
|
45
|
+
|
|
46
|
+
def __contains__(self, key: str) -> bool:
|
|
47
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="CollectorStatusRead")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class CollectorStatusRead:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
name (str):
|
|
18
|
+
status (str):
|
|
19
|
+
backlog_count (int):
|
|
20
|
+
last_update (datetime.datetime):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
status: str
|
|
25
|
+
backlog_count: int
|
|
26
|
+
last_update: datetime.datetime
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
name = self.name
|
|
31
|
+
|
|
32
|
+
status = self.status
|
|
33
|
+
|
|
34
|
+
backlog_count = self.backlog_count
|
|
35
|
+
|
|
36
|
+
last_update = self.last_update.isoformat()
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"name": name,
|
|
43
|
+
"status": status,
|
|
44
|
+
"backlog_count": backlog_count,
|
|
45
|
+
"last_update": last_update,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
name = d.pop("name")
|
|
55
|
+
|
|
56
|
+
status = d.pop("status")
|
|
57
|
+
|
|
58
|
+
backlog_count = d.pop("backlog_count")
|
|
59
|
+
|
|
60
|
+
last_update = datetime.datetime.fromisoformat(d.pop("last_update"))
|
|
61
|
+
|
|
62
|
+
collector_status_read = cls(
|
|
63
|
+
name=name,
|
|
64
|
+
status=status,
|
|
65
|
+
backlog_count=backlog_count,
|
|
66
|
+
last_update=last_update,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
collector_status_read.additional_properties = d
|
|
70
|
+
return collector_status_read
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def additional_keys(self) -> list[str]:
|
|
74
|
+
return list(self.additional_properties.keys())
|
|
75
|
+
|
|
76
|
+
def __getitem__(self, key: str) -> Any:
|
|
77
|
+
return self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
80
|
+
self.additional_properties[key] = value
|
|
81
|
+
|
|
82
|
+
def __delitem__(self, key: str) -> None:
|
|
83
|
+
del self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __contains__(self, key: str) -> bool:
|
|
86
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="CompanyRead")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CompanyRead:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (int):
|
|
17
|
+
name (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
id: int
|
|
21
|
+
name: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
id = self.id
|
|
26
|
+
|
|
27
|
+
name = self.name
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"id": id,
|
|
34
|
+
"name": name,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
id = d.pop("id")
|
|
44
|
+
|
|
45
|
+
name = d.pop("name")
|
|
46
|
+
|
|
47
|
+
company_read = cls(
|
|
48
|
+
id=id,
|
|
49
|
+
name=name,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
company_read.additional_properties = d
|
|
53
|
+
return company_read
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="EventRead")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class EventRead:
|
|
14
|
+
"""An event serialized from ``Event.json``.
|
|
15
|
+
|
|
16
|
+
``Event.json`` produces a wide, semi-dynamic dict (nested malware/threats,
|
|
17
|
+
list-valued tags/companies/alerts, an ``owner`` sub-object, etc.). Rather
|
|
18
|
+
than re-enumerate every field — and risk drifting from the source of truth —
|
|
19
|
+
this model declares the stable scalar fields and allows the remainder
|
|
20
|
+
through unchanged.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
id (int):
|
|
24
|
+
uuid (str):
|
|
25
|
+
name (str):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
id: int
|
|
29
|
+
uuid: str
|
|
30
|
+
name: str
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
id = self.id
|
|
35
|
+
|
|
36
|
+
uuid = self.uuid
|
|
37
|
+
|
|
38
|
+
name = self.name
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"id": id,
|
|
45
|
+
"uuid": uuid,
|
|
46
|
+
"name": name,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
id = d.pop("id")
|
|
56
|
+
|
|
57
|
+
uuid = d.pop("uuid")
|
|
58
|
+
|
|
59
|
+
name = d.pop("name")
|
|
60
|
+
|
|
61
|
+
event_read = cls(
|
|
62
|
+
id=id,
|
|
63
|
+
uuid=uuid,
|
|
64
|
+
name=name,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
event_read.additional_properties = d
|
|
68
|
+
return event_read
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def additional_keys(self) -> list[str]:
|
|
72
|
+
return list(self.additional_properties.keys())
|
|
73
|
+
|
|
74
|
+
def __getitem__(self, key: str) -> Any:
|
|
75
|
+
return self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
78
|
+
self.additional_properties[key] = value
|
|
79
|
+
|
|
80
|
+
def __delitem__(self, key: str) -> None:
|
|
81
|
+
del self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __contains__(self, key: str) -> bool:
|
|
84
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="HealthResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class HealthResponse:
|
|
14
|
+
"""Response model for health check endpoint.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
result (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
result: str
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
result = self.result
|
|
25
|
+
|
|
26
|
+
field_dict: dict[str, Any] = {}
|
|
27
|
+
field_dict.update(self.additional_properties)
|
|
28
|
+
field_dict.update(
|
|
29
|
+
{
|
|
30
|
+
"result": result,
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
return field_dict
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
38
|
+
d = dict(src_dict)
|
|
39
|
+
result = d.pop("result")
|
|
40
|
+
|
|
41
|
+
health_response = cls(
|
|
42
|
+
result=result,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
health_response.additional_properties = d
|
|
46
|
+
return health_response
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def additional_keys(self) -> list[str]:
|
|
50
|
+
return list(self.additional_properties.keys())
|
|
51
|
+
|
|
52
|
+
def __getitem__(self, key: str) -> Any:
|
|
53
|
+
return self.additional_properties[key]
|
|
54
|
+
|
|
55
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
56
|
+
self.additional_properties[key] = value
|
|
57
|
+
|
|
58
|
+
def __delitem__(self, key: str) -> None:
|
|
59
|
+
del self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __contains__(self, key: str) -> bool:
|
|
62
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
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
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.validation_error import ValidationError
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="HTTPValidationError")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class HTTPValidationError:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
detail (list[ValidationError] | Unset):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
detail: list[ValidationError] | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
detail: list[dict[str, Any]] | Unset = UNSET
|
|
30
|
+
if not isinstance(self.detail, Unset):
|
|
31
|
+
detail = []
|
|
32
|
+
for detail_item_data in self.detail:
|
|
33
|
+
detail_item = detail_item_data.to_dict()
|
|
34
|
+
detail.append(detail_item)
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update({})
|
|
39
|
+
if detail is not UNSET:
|
|
40
|
+
field_dict["detail"] = detail
|
|
41
|
+
|
|
42
|
+
return field_dict
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
+
from ..models.validation_error import ValidationError
|
|
47
|
+
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
_detail = d.pop("detail", UNSET)
|
|
50
|
+
detail: list[ValidationError] | Unset = UNSET
|
|
51
|
+
if _detail is not UNSET:
|
|
52
|
+
detail = []
|
|
53
|
+
for detail_item_data in _detail:
|
|
54
|
+
detail_item = ValidationError.from_dict(detail_item_data)
|
|
55
|
+
|
|
56
|
+
detail.append(detail_item)
|
|
57
|
+
|
|
58
|
+
http_validation_error = cls(
|
|
59
|
+
detail=detail,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
http_validation_error.additional_properties = d
|
|
63
|
+
return http_validation_error
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def additional_keys(self) -> list[str]:
|
|
67
|
+
return list(self.additional_properties.keys())
|
|
68
|
+
|
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
|
70
|
+
return self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
73
|
+
self.additional_properties[key] = value
|
|
74
|
+
|
|
75
|
+
def __delitem__(self, key: str) -> None:
|
|
76
|
+
del self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __contains__(self, key: str) -> bool:
|
|
79
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.company_read import CompanyRead
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="ListResponseCompanyRead")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ListResponseCompanyRead:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
data (list[CompanyRead]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
data: list[CompanyRead]
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
data = []
|
|
28
|
+
for data_item_data in self.data:
|
|
29
|
+
data_item = data_item_data.to_dict()
|
|
30
|
+
data.append(data_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"data": data,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
from ..models.company_read import CompanyRead
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
data = []
|
|
48
|
+
_data = d.pop("data")
|
|
49
|
+
for data_item_data in _data:
|
|
50
|
+
data_item = CompanyRead.from_dict(data_item_data)
|
|
51
|
+
|
|
52
|
+
data.append(data_item)
|
|
53
|
+
|
|
54
|
+
list_response_company_read = cls(
|
|
55
|
+
data=data,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
list_response_company_read.additional_properties = d
|
|
59
|
+
return list_response_company_read
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.event_read import EventRead
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="ListResponseEventRead")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ListResponseEventRead:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
data (list[EventRead]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
data: list[EventRead]
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
data = []
|
|
28
|
+
for data_item_data in self.data:
|
|
29
|
+
data_item = data_item_data.to_dict()
|
|
30
|
+
data.append(data_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"data": data,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
from ..models.event_read import EventRead
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
data = []
|
|
48
|
+
_data = d.pop("data")
|
|
49
|
+
for data_item_data in _data:
|
|
50
|
+
data_item = EventRead.from_dict(data_item_data)
|
|
51
|
+
|
|
52
|
+
data.append(data_item)
|
|
53
|
+
|
|
54
|
+
list_response_event_read = cls(
|
|
55
|
+
data=data,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
list_response_event_read.additional_properties = d
|
|
59
|
+
return list_response_event_read
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|