skillforge-client 0.3.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.
- skillforge_client/__init__.py +8 -0
- skillforge_client/api/__init__.py +1 -0
- skillforge_client/api/auth/__init__.py +1 -0
- skillforge_client/api/auth/create_application_client_endpoint_api_v1_auth_clients_post.py +166 -0
- skillforge_client/api/auth/create_application_client_secret_endpoint_api_v1_auth_clients_client_id_secrets_post.py +182 -0
- skillforge_client/api/auth/create_token_api_v1_auth_token_post.py +165 -0
- skillforge_client/api/auth/grant_application_client_scopes_endpoint_api_v1_auth_clients_client_id_scopes_post.py +182 -0
- skillforge_client/api/auth/read_application_client_api_v1_auth_clients_client_id_get.py +161 -0
- skillforge_client/api/auth/read_application_clients_api_v1_auth_clients_get.py +133 -0
- skillforge_client/api/auth/revoke_application_client_scope_endpoint_api_v1_auth_clients_client_id_scopes_scope_key_delete.py +173 -0
- skillforge_client/api/auth/revoke_application_client_secret_endpoint_api_v1_auth_clients_client_id_secrets_secret_id_delete.py +174 -0
- skillforge_client/api/auth/update_application_client_endpoint_api_v1_auth_clients_client_id_patch.py +182 -0
- skillforge_client/api/bot/__init__.py +1 -0
- skillforge_client/api/bot/add_user_to_group_endpoint_api_v1_bot_users_discord_id_groups_group_key_put.py +199 -0
- skillforge_client/api/bot/cancel_operation_endpoint_api_v1_bot_operations_operation_id_cancel_post.py +203 -0
- skillforge_client/api/bot/check_authorization_endpoint_api_v1_bot_authz_check_post.py +206 -0
- skillforge_client/api/bot/claim_jobs_endpoint_api_v1_bot_jobs_claim_post.py +210 -0
- skillforge_client/api/bot/commit_student_activation_endpoint_api_v1_bot_students_activations_operation_id_commit_post.py +204 -0
- skillforge_client/api/bot/commit_student_deactivation_endpoint_api_v1_bot_students_guild_id_student_discord_id_deactivate_operation_id_commit_post.py +211 -0
- skillforge_client/api/bot/commit_student_pop_endpoint_api_v1_bot_students_guild_id_student_discord_id_pop_operation_id_commit_post.py +211 -0
- skillforge_client/api/bot/commit_student_stash_endpoint_api_v1_bot_students_guild_id_student_discord_id_stash_operation_id_commit_post.py +211 -0
- skillforge_client/api/bot/commit_tutor_activation_endpoint_api_v1_bot_tutors_activations_operation_id_commit_post.py +204 -0
- skillforge_client/api/bot/commit_tutor_deactivation_endpoint_api_v1_bot_tutors_guild_id_tutor_discord_id_deactivate_operation_id_commit_post.py +211 -0
- skillforge_client/api/bot/complete_job_endpoint_api_v1_bot_jobs_job_id_complete_post.py +183 -0
- skillforge_client/api/bot/deactivate_discord_account_endpoint_api_v1_bot_users_discord_id_account_delete.py +197 -0
- skillforge_client/api/bot/delete_command_env_endpoint_api_v1_bot_command_envs_guild_id_channel_id_kind_delete.py +204 -0
- skillforge_client/api/bot/fail_job_endpoint_api_v1_bot_jobs_job_id_fail_post.py +228 -0
- skillforge_client/api/bot/job_queue_summary_endpoint_api_v1_bot_jobs_summary_get.py +202 -0
- skillforge_client/api/bot/link_discord_account_endpoint_api_v1_bot_users_discord_id_account_put.py +227 -0
- skillforge_client/api/bot/list_jobs_endpoint_api_v1_bot_jobs_get.py +243 -0
- skillforge_client/api/bot/list_operations_endpoint_api_v1_bot_operations_get.py +302 -0
- skillforge_client/api/bot/prepare_student_activation_endpoint_api_v1_bot_students_activations_prepare_post.py +181 -0
- skillforge_client/api/bot/prepare_student_deactivation_endpoint_api_v1_bot_students_guild_id_student_discord_id_deactivate_prepare_post.py +190 -0
- skillforge_client/api/bot/prepare_student_pop_endpoint_api_v1_bot_students_guild_id_student_discord_id_pop_prepare_post.py +190 -0
- skillforge_client/api/bot/prepare_student_stash_endpoint_api_v1_bot_students_guild_id_student_discord_id_stash_prepare_post.py +190 -0
- skillforge_client/api/bot/prepare_tutor_activation_endpoint_api_v1_bot_tutors_activations_prepare_post.py +181 -0
- skillforge_client/api/bot/prepare_tutor_deactivation_endpoint_api_v1_bot_tutors_guild_id_tutor_discord_id_deactivate_prepare_post.py +190 -0
- skillforge_client/api/bot/read_job_api_v1_bot_jobs_job_id_get.py +186 -0
- skillforge_client/api/bot/read_operation_api_v1_bot_operations_operation_id_get.py +186 -0
- skillforge_client/api/bot/read_principal_api_v1_bot_runtime_principals_discord_id_get.py +177 -0
- skillforge_client/api/bot/read_principals_batch_api_v1_bot_runtime_principals_batch_post.py +189 -0
- skillforge_client/api/bot/read_student_context_api_v1_bot_runtime_students_guild_id_discord_id_get.py +191 -0
- skillforge_client/api/bot/read_student_contexts_batch_api_v1_bot_runtime_students_guild_id_batch_post.py +205 -0
- skillforge_client/api/bot/read_tutor_context_api_v1_bot_runtime_tutors_guild_id_discord_id_get.py +191 -0
- skillforge_client/api/bot/read_tutor_contexts_batch_api_v1_bot_runtime_tutors_guild_id_batch_post.py +205 -0
- skillforge_client/api/bot/remove_user_from_group_endpoint_api_v1_bot_users_discord_id_groups_group_key_delete.py +197 -0
- skillforge_client/api/bot/resolve_command_env_endpoint_api_v1_bot_runtime_command_envs_resolve_get.py +234 -0
- skillforge_client/api/bot/upsert_command_env_endpoint_api_v1_bot_command_envs_put.py +181 -0
- skillforge_client/api/bot/upsert_discord_user_endpoint_api_v1_bot_users_discord_id_put.py +213 -0
- skillforge_client/api/default/__init__.py +1 -0
- skillforge_client/api/default/root_get.py +81 -0
- skillforge_client/api/system/__init__.py +1 -0
- skillforge_client/api/system/dependencies_health_check_health_dependencies_get.py +136 -0
- skillforge_client/api/system/dependency_health_check_health_dependencies_dependency_name_get.py +170 -0
- skillforge_client/api/system/liveness_check_health_live_get.py +132 -0
- skillforge_client/api/system/system_health_check_health_get.py +136 -0
- skillforge_client/api/system/worker_health_check_health_workers_worker_name_get.py +170 -0
- skillforge_client/api/system/workers_health_check_health_workers_get.py +136 -0
- skillforge_client/client.py +268 -0
- skillforge_client/errors.py +16 -0
- skillforge_client/models/__init__.py +167 -0
- skillforge_client/models/access_token_response.py +85 -0
- skillforge_client/models/application_client_create_request.py +91 -0
- skillforge_client/models/application_client_response.py +149 -0
- skillforge_client/models/application_client_scope_grant_request.py +61 -0
- skillforge_client/models/application_client_secret_create_request.py +104 -0
- skillforge_client/models/application_client_secret_response.py +160 -0
- skillforge_client/models/application_client_status.py +9 -0
- skillforge_client/models/application_client_update_request.py +124 -0
- skillforge_client/models/authorization_check_request.py +78 -0
- skillforge_client/models/authorization_check_response.py +61 -0
- skillforge_client/models/body_create_token_api_v1_auth_token_post.py +123 -0
- skillforge_client/models/bot_job.py +119 -0
- skillforge_client/models/bot_job_payload.py +47 -0
- skillforge_client/models/bot_principal.py +148 -0
- skillforge_client/models/command_env_channel_response.py +100 -0
- skillforge_client/models/command_env_kind.py +9 -0
- skillforge_client/models/command_env_upsert_request.py +100 -0
- skillforge_client/models/contact_info_profile.py +92 -0
- skillforge_client/models/contact_info_type.py +9 -0
- skillforge_client/models/created_client_secret_response.py +75 -0
- skillforge_client/models/dependencies_health_check_response.py +77 -0
- skillforge_client/models/dependencies_health_check_response_checks.py +56 -0
- skillforge_client/models/dependency_health_check_response.py +72 -0
- skillforge_client/models/dependency_name.py +8 -0
- skillforge_client/models/discord_account_link_request.py +82 -0
- skillforge_client/models/discord_account_link_response.py +86 -0
- skillforge_client/models/discord_account_profile.py +77 -0
- skillforge_client/models/discord_id_batch_request.py +62 -0
- skillforge_client/models/discord_user_response.py +87 -0
- skillforge_client/models/discord_user_upsert_request.py +81 -0
- skillforge_client/models/error_response.py +61 -0
- skillforge_client/models/external_accounts_profile.py +124 -0
- skillforge_client/models/group_membership_response.py +69 -0
- skillforge_client/models/health_check_response.py +63 -0
- skillforge_client/models/health_status.py +10 -0
- skillforge_client/models/http_validation_error.py +79 -0
- skillforge_client/models/job_claim_request.py +113 -0
- skillforge_client/models/job_detail.py +239 -0
- skillforge_client/models/job_detail_payload.py +47 -0
- skillforge_client/models/job_fail_request.py +82 -0
- skillforge_client/models/job_kind_counts.py +92 -0
- skillforge_client/models/job_list_item.py +225 -0
- skillforge_client/models/job_page.py +100 -0
- skillforge_client/models/job_queue_summary.py +106 -0
- skillforge_client/models/job_response.py +187 -0
- skillforge_client/models/job_status.py +11 -0
- skillforge_client/models/job_status_counts.py +86 -0
- skillforge_client/models/member_role.py +10 -0
- skillforge_client/models/microsoft_account_profile.py +61 -0
- skillforge_client/models/operation_cancel_response.py +108 -0
- skillforge_client/models/operation_kind.py +13 -0
- skillforge_client/models/operation_page.py +100 -0
- skillforge_client/models/operation_response.py +257 -0
- skillforge_client/models/operation_response_plan.py +47 -0
- skillforge_client/models/operation_status.py +12 -0
- skillforge_client/models/operation_summary.py +243 -0
- skillforge_client/models/operational_profile.py +178 -0
- skillforge_client/models/party_relation_type.py +10 -0
- skillforge_client/models/person_profile.py +69 -0
- skillforge_client/models/principal_batch.py +84 -0
- skillforge_client/models/relation_profile.py +81 -0
- skillforge_client/models/relation_profile_direction.py +9 -0
- skillforge_client/models/student_activation_commit_request.py +61 -0
- skillforge_client/models/student_activation_prepare_request.py +77 -0
- skillforge_client/models/student_channel_state.py +9 -0
- skillforge_client/models/student_context.py +140 -0
- skillforge_client/models/student_context_batch.py +83 -0
- skillforge_client/models/system_health_check_response.py +87 -0
- skillforge_client/models/transition_commit_response.py +108 -0
- skillforge_client/models/transition_prepare_response.py +95 -0
- skillforge_client/models/transition_prepare_response_plan.py +47 -0
- skillforge_client/models/tutor_activation_commit_request.py +69 -0
- skillforge_client/models/tutor_activation_prepare_request.py +69 -0
- skillforge_client/models/tutor_context.py +99 -0
- skillforge_client/models/tutor_context_batch.py +83 -0
- skillforge_client/models/validation_error.py +123 -0
- skillforge_client/models/validation_error_context.py +47 -0
- skillforge_client/models/worker_health_check_response.py +72 -0
- skillforge_client/models/worker_name.py +8 -0
- skillforge_client/models/workers_health_check_response.py +77 -0
- skillforge_client/models/workers_health_check_response_checks.py +56 -0
- skillforge_client/py.typed +1 -0
- skillforge_client/types.py +54 -0
- skillforge_client-0.3.0.dist-info/METADATA +83 -0
- skillforge_client-0.3.0.dist-info/RECORD +147 -0
- skillforge_client-0.3.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
from uuid import UUID
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.contact_info_profile import ContactInfoProfile
|
|
14
|
+
from ..models.external_accounts_profile import ExternalAccountsProfile
|
|
15
|
+
from ..models.person_profile import PersonProfile
|
|
16
|
+
from ..models.relation_profile import RelationProfile
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="OperationalProfile")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OperationalProfile:
|
|
24
|
+
"""Operational view of a party. Intentionally excludes billing/finance data.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
party_id (UUID):
|
|
28
|
+
contact_infos (list[ContactInfoProfile] | Unset):
|
|
29
|
+
external_accounts (ExternalAccountsProfile | Unset):
|
|
30
|
+
person (None | PersonProfile | Unset):
|
|
31
|
+
relations (list[RelationProfile] | Unset):
|
|
32
|
+
subjects (list[str] | Unset):
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
party_id: UUID
|
|
36
|
+
contact_infos: list[ContactInfoProfile] | Unset = UNSET
|
|
37
|
+
external_accounts: ExternalAccountsProfile | Unset = UNSET
|
|
38
|
+
person: None | PersonProfile | Unset = UNSET
|
|
39
|
+
relations: list[RelationProfile] | Unset = UNSET
|
|
40
|
+
subjects: list[str] | Unset = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
from ..models.person_profile import PersonProfile
|
|
45
|
+
|
|
46
|
+
party_id = str(self.party_id)
|
|
47
|
+
|
|
48
|
+
contact_infos: list[dict[str, Any]] | Unset = UNSET
|
|
49
|
+
if not isinstance(self.contact_infos, Unset):
|
|
50
|
+
contact_infos = []
|
|
51
|
+
for contact_infos_item_data in self.contact_infos:
|
|
52
|
+
contact_infos_item = contact_infos_item_data.to_dict()
|
|
53
|
+
contact_infos.append(contact_infos_item)
|
|
54
|
+
|
|
55
|
+
external_accounts: dict[str, Any] | Unset = UNSET
|
|
56
|
+
if not isinstance(self.external_accounts, Unset):
|
|
57
|
+
external_accounts = self.external_accounts.to_dict()
|
|
58
|
+
|
|
59
|
+
person: dict[str, Any] | None | Unset
|
|
60
|
+
if isinstance(self.person, Unset):
|
|
61
|
+
person = UNSET
|
|
62
|
+
elif isinstance(self.person, PersonProfile):
|
|
63
|
+
person = self.person.to_dict()
|
|
64
|
+
else:
|
|
65
|
+
person = self.person
|
|
66
|
+
|
|
67
|
+
relations: list[dict[str, Any]] | Unset = UNSET
|
|
68
|
+
if not isinstance(self.relations, Unset):
|
|
69
|
+
relations = []
|
|
70
|
+
for relations_item_data in self.relations:
|
|
71
|
+
relations_item = relations_item_data.to_dict()
|
|
72
|
+
relations.append(relations_item)
|
|
73
|
+
|
|
74
|
+
subjects: list[str] | Unset = UNSET
|
|
75
|
+
if not isinstance(self.subjects, Unset):
|
|
76
|
+
subjects = self.subjects
|
|
77
|
+
|
|
78
|
+
field_dict: dict[str, Any] = {}
|
|
79
|
+
field_dict.update(self.additional_properties)
|
|
80
|
+
field_dict.update(
|
|
81
|
+
{
|
|
82
|
+
"party_id": party_id,
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
if contact_infos is not UNSET:
|
|
86
|
+
field_dict["contact_infos"] = contact_infos
|
|
87
|
+
if external_accounts is not UNSET:
|
|
88
|
+
field_dict["external_accounts"] = external_accounts
|
|
89
|
+
if person is not UNSET:
|
|
90
|
+
field_dict["person"] = person
|
|
91
|
+
if relations is not UNSET:
|
|
92
|
+
field_dict["relations"] = relations
|
|
93
|
+
if subjects is not UNSET:
|
|
94
|
+
field_dict["subjects"] = subjects
|
|
95
|
+
|
|
96
|
+
return field_dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
100
|
+
from ..models.contact_info_profile import ContactInfoProfile
|
|
101
|
+
from ..models.external_accounts_profile import ExternalAccountsProfile
|
|
102
|
+
from ..models.person_profile import PersonProfile
|
|
103
|
+
from ..models.relation_profile import RelationProfile
|
|
104
|
+
|
|
105
|
+
d = dict(src_dict)
|
|
106
|
+
party_id = UUID(d.pop("party_id"))
|
|
107
|
+
|
|
108
|
+
_contact_infos = d.pop("contact_infos", UNSET)
|
|
109
|
+
contact_infos: list[ContactInfoProfile] | Unset = UNSET
|
|
110
|
+
if _contact_infos is not UNSET:
|
|
111
|
+
contact_infos = []
|
|
112
|
+
for contact_infos_item_data in _contact_infos:
|
|
113
|
+
contact_infos_item = ContactInfoProfile.from_dict(contact_infos_item_data)
|
|
114
|
+
|
|
115
|
+
contact_infos.append(contact_infos_item)
|
|
116
|
+
|
|
117
|
+
_external_accounts = d.pop("external_accounts", UNSET)
|
|
118
|
+
external_accounts: ExternalAccountsProfile | Unset
|
|
119
|
+
if isinstance(_external_accounts, Unset):
|
|
120
|
+
external_accounts = UNSET
|
|
121
|
+
else:
|
|
122
|
+
external_accounts = ExternalAccountsProfile.from_dict(_external_accounts)
|
|
123
|
+
|
|
124
|
+
def _parse_person(data: object) -> None | PersonProfile | Unset:
|
|
125
|
+
if data is None:
|
|
126
|
+
return data
|
|
127
|
+
if isinstance(data, Unset):
|
|
128
|
+
return data
|
|
129
|
+
try:
|
|
130
|
+
if not isinstance(data, dict):
|
|
131
|
+
raise TypeError()
|
|
132
|
+
person_type_0 = PersonProfile.from_dict(data)
|
|
133
|
+
|
|
134
|
+
return person_type_0
|
|
135
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
136
|
+
pass
|
|
137
|
+
return cast(None | PersonProfile | Unset, data)
|
|
138
|
+
|
|
139
|
+
person = _parse_person(d.pop("person", UNSET))
|
|
140
|
+
|
|
141
|
+
_relations = d.pop("relations", UNSET)
|
|
142
|
+
relations: list[RelationProfile] | Unset = UNSET
|
|
143
|
+
if _relations is not UNSET:
|
|
144
|
+
relations = []
|
|
145
|
+
for relations_item_data in _relations:
|
|
146
|
+
relations_item = RelationProfile.from_dict(relations_item_data)
|
|
147
|
+
|
|
148
|
+
relations.append(relations_item)
|
|
149
|
+
|
|
150
|
+
subjects = cast(list[str], d.pop("subjects", UNSET))
|
|
151
|
+
|
|
152
|
+
operational_profile = cls(
|
|
153
|
+
party_id=party_id,
|
|
154
|
+
contact_infos=contact_infos,
|
|
155
|
+
external_accounts=external_accounts,
|
|
156
|
+
person=person,
|
|
157
|
+
relations=relations,
|
|
158
|
+
subjects=subjects,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
operational_profile.additional_properties = d
|
|
162
|
+
return operational_profile
|
|
163
|
+
|
|
164
|
+
@property
|
|
165
|
+
def additional_keys(self) -> list[str]:
|
|
166
|
+
return list(self.additional_properties.keys())
|
|
167
|
+
|
|
168
|
+
def __getitem__(self, key: str) -> Any:
|
|
169
|
+
return self.additional_properties[key]
|
|
170
|
+
|
|
171
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
172
|
+
self.additional_properties[key] = value
|
|
173
|
+
|
|
174
|
+
def __delitem__(self, key: str) -> None:
|
|
175
|
+
del self.additional_properties[key]
|
|
176
|
+
|
|
177
|
+
def __contains__(self, key: str) -> bool:
|
|
178
|
+
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="PersonProfile")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PersonProfile:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
firstname (str):
|
|
17
|
+
lastname (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
firstname: str
|
|
21
|
+
lastname: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
firstname = self.firstname
|
|
26
|
+
|
|
27
|
+
lastname = self.lastname
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"firstname": firstname,
|
|
34
|
+
"lastname": lastname,
|
|
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
|
+
firstname = d.pop("firstname")
|
|
44
|
+
|
|
45
|
+
lastname = d.pop("lastname")
|
|
46
|
+
|
|
47
|
+
person_profile = cls(
|
|
48
|
+
firstname=firstname,
|
|
49
|
+
lastname=lastname,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
person_profile.additional_properties = d
|
|
53
|
+
return person_profile
|
|
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 TYPE_CHECKING, Any, TypeVar, cast
|
|
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.bot_principal import BotPrincipal
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PrincipalBatch")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PrincipalBatch:
|
|
18
|
+
"""Partial-result envelope: resolved principals plus the requested ids that did not resolve.
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
found (list[BotPrincipal]):
|
|
22
|
+
missing (list[int]):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
found: list[BotPrincipal]
|
|
26
|
+
missing: list[int]
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
found = []
|
|
31
|
+
for found_item_data in self.found:
|
|
32
|
+
found_item = found_item_data.to_dict()
|
|
33
|
+
found.append(found_item)
|
|
34
|
+
|
|
35
|
+
missing = self.missing
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"found": found,
|
|
42
|
+
"missing": missing,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
from ..models.bot_principal import BotPrincipal
|
|
51
|
+
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
found = []
|
|
54
|
+
_found = d.pop("found")
|
|
55
|
+
for found_item_data in _found:
|
|
56
|
+
found_item = BotPrincipal.from_dict(found_item_data)
|
|
57
|
+
|
|
58
|
+
found.append(found_item)
|
|
59
|
+
|
|
60
|
+
missing = cast(list[int], d.pop("missing"))
|
|
61
|
+
|
|
62
|
+
principal_batch = cls(
|
|
63
|
+
found=found,
|
|
64
|
+
missing=missing,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
principal_batch.additional_properties = d
|
|
68
|
+
return principal_batch
|
|
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,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
from uuid import UUID
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from ..models.party_relation_type import PartyRelationType
|
|
11
|
+
from ..models.relation_profile_direction import RelationProfileDirection
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="RelationProfile")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class RelationProfile:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
counterparty_party_id (UUID):
|
|
21
|
+
direction (RelationProfileDirection):
|
|
22
|
+
type_ (PartyRelationType):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
counterparty_party_id: UUID
|
|
26
|
+
direction: RelationProfileDirection
|
|
27
|
+
type_: PartyRelationType
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
counterparty_party_id = str(self.counterparty_party_id)
|
|
32
|
+
|
|
33
|
+
direction = self.direction.value
|
|
34
|
+
|
|
35
|
+
type_ = self.type_.value
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"counterparty_party_id": counterparty_party_id,
|
|
42
|
+
"direction": direction,
|
|
43
|
+
"type": type_,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
d = dict(src_dict)
|
|
52
|
+
counterparty_party_id = UUID(d.pop("counterparty_party_id"))
|
|
53
|
+
|
|
54
|
+
direction = RelationProfileDirection(d.pop("direction"))
|
|
55
|
+
|
|
56
|
+
type_ = PartyRelationType(d.pop("type"))
|
|
57
|
+
|
|
58
|
+
relation_profile = cls(
|
|
59
|
+
counterparty_party_id=counterparty_party_id,
|
|
60
|
+
direction=direction,
|
|
61
|
+
type_=type_,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
relation_profile.additional_properties = d
|
|
65
|
+
return relation_profile
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
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="StudentActivationCommitRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class StudentActivationCommitRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
channel_id (int):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
channel_id: int
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
channel_id = self.channel_id
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"channel_id": channel_id,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
channel_id = d.pop("channel_id")
|
|
39
|
+
|
|
40
|
+
student_activation_commit_request = cls(
|
|
41
|
+
channel_id=channel_id,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
student_activation_commit_request.additional_properties = d
|
|
45
|
+
return student_activation_commit_request
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,77 @@
|
|
|
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="StudentActivationPrepareRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class StudentActivationPrepareRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
guild_id (int):
|
|
17
|
+
student_discord_id (int):
|
|
18
|
+
tutor_discord_id (int):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
guild_id: int
|
|
22
|
+
student_discord_id: int
|
|
23
|
+
tutor_discord_id: int
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
guild_id = self.guild_id
|
|
28
|
+
|
|
29
|
+
student_discord_id = self.student_discord_id
|
|
30
|
+
|
|
31
|
+
tutor_discord_id = self.tutor_discord_id
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"guild_id": guild_id,
|
|
38
|
+
"student_discord_id": student_discord_id,
|
|
39
|
+
"tutor_discord_id": tutor_discord_id,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
guild_id = d.pop("guild_id")
|
|
49
|
+
|
|
50
|
+
student_discord_id = d.pop("student_discord_id")
|
|
51
|
+
|
|
52
|
+
tutor_discord_id = d.pop("tutor_discord_id")
|
|
53
|
+
|
|
54
|
+
student_activation_prepare_request = cls(
|
|
55
|
+
guild_id=guild_id,
|
|
56
|
+
student_discord_id=student_discord_id,
|
|
57
|
+
tutor_discord_id=tutor_discord_id,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
student_activation_prepare_request.additional_properties = d
|
|
61
|
+
return student_activation_prepare_request
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def additional_keys(self) -> list[str]:
|
|
65
|
+
return list(self.additional_properties.keys())
|
|
66
|
+
|
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
|
68
|
+
return self.additional_properties[key]
|
|
69
|
+
|
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
+
self.additional_properties[key] = value
|
|
72
|
+
|
|
73
|
+
def __delitem__(self, key: str) -> None:
|
|
74
|
+
del self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __contains__(self, key: str) -> bool:
|
|
77
|
+
return key in self.additional_properties
|