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,87 @@
|
|
|
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
|
+
from ..models.member_role import MemberRole
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DiscordUserResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DiscordUserResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
active (bool):
|
|
19
|
+
discord_id (int):
|
|
20
|
+
nick_name (str):
|
|
21
|
+
role (MemberRole):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
active: bool
|
|
25
|
+
discord_id: int
|
|
26
|
+
nick_name: str
|
|
27
|
+
role: MemberRole
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
active = self.active
|
|
32
|
+
|
|
33
|
+
discord_id = self.discord_id
|
|
34
|
+
|
|
35
|
+
nick_name = self.nick_name
|
|
36
|
+
|
|
37
|
+
role = self.role.value
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"active": active,
|
|
44
|
+
"discord_id": discord_id,
|
|
45
|
+
"nick_name": nick_name,
|
|
46
|
+
"role": role,
|
|
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
|
+
active = d.pop("active")
|
|
56
|
+
|
|
57
|
+
discord_id = d.pop("discord_id")
|
|
58
|
+
|
|
59
|
+
nick_name = d.pop("nick_name")
|
|
60
|
+
|
|
61
|
+
role = MemberRole(d.pop("role"))
|
|
62
|
+
|
|
63
|
+
discord_user_response = cls(
|
|
64
|
+
active=active,
|
|
65
|
+
discord_id=discord_id,
|
|
66
|
+
nick_name=nick_name,
|
|
67
|
+
role=role,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
discord_user_response.additional_properties = d
|
|
71
|
+
return discord_user_response
|
|
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,81 @@
|
|
|
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
|
+
from ..models.member_role import MemberRole
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="DiscordUserUpsertRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class DiscordUserUpsertRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
nick_name (str):
|
|
20
|
+
role (MemberRole):
|
|
21
|
+
active (bool | Unset): Default: True.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
nick_name: str
|
|
25
|
+
role: MemberRole
|
|
26
|
+
active: bool | Unset = True
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
nick_name = self.nick_name
|
|
31
|
+
|
|
32
|
+
role = self.role.value
|
|
33
|
+
|
|
34
|
+
active = self.active
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"nick_name": nick_name,
|
|
41
|
+
"role": role,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
if active is not UNSET:
|
|
45
|
+
field_dict["active"] = active
|
|
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
|
+
nick_name = d.pop("nick_name")
|
|
53
|
+
|
|
54
|
+
role = MemberRole(d.pop("role"))
|
|
55
|
+
|
|
56
|
+
active = d.pop("active", UNSET)
|
|
57
|
+
|
|
58
|
+
discord_user_upsert_request = cls(
|
|
59
|
+
nick_name=nick_name,
|
|
60
|
+
role=role,
|
|
61
|
+
active=active,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
discord_user_upsert_request.additional_properties = d
|
|
65
|
+
return discord_user_upsert_request
|
|
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="ErrorResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ErrorResponse:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
detail (str):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
detail: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
detail = self.detail
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"detail": detail,
|
|
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
|
+
detail = d.pop("detail")
|
|
39
|
+
|
|
40
|
+
error_response = cls(
|
|
41
|
+
detail=detail,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
error_response.additional_properties = d
|
|
45
|
+
return error_response
|
|
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,124 @@
|
|
|
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.discord_account_profile import DiscordAccountProfile
|
|
13
|
+
from ..models.microsoft_account_profile import MicrosoftAccountProfile
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="ExternalAccountsProfile")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ExternalAccountsProfile:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
discord (DiscordAccountProfile | None | Unset):
|
|
24
|
+
microsoft (MicrosoftAccountProfile | None | Unset):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
discord: DiscordAccountProfile | None | Unset = UNSET
|
|
28
|
+
microsoft: MicrosoftAccountProfile | None | Unset = UNSET
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
from ..models.discord_account_profile import DiscordAccountProfile
|
|
33
|
+
from ..models.microsoft_account_profile import MicrosoftAccountProfile
|
|
34
|
+
|
|
35
|
+
discord: dict[str, Any] | None | Unset
|
|
36
|
+
if isinstance(self.discord, Unset):
|
|
37
|
+
discord = UNSET
|
|
38
|
+
elif isinstance(self.discord, DiscordAccountProfile):
|
|
39
|
+
discord = self.discord.to_dict()
|
|
40
|
+
else:
|
|
41
|
+
discord = self.discord
|
|
42
|
+
|
|
43
|
+
microsoft: dict[str, Any] | None | Unset
|
|
44
|
+
if isinstance(self.microsoft, Unset):
|
|
45
|
+
microsoft = UNSET
|
|
46
|
+
elif isinstance(self.microsoft, MicrosoftAccountProfile):
|
|
47
|
+
microsoft = self.microsoft.to_dict()
|
|
48
|
+
else:
|
|
49
|
+
microsoft = self.microsoft
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update({})
|
|
54
|
+
if discord is not UNSET:
|
|
55
|
+
field_dict["discord"] = discord
|
|
56
|
+
if microsoft is not UNSET:
|
|
57
|
+
field_dict["microsoft"] = microsoft
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
63
|
+
from ..models.discord_account_profile import DiscordAccountProfile
|
|
64
|
+
from ..models.microsoft_account_profile import MicrosoftAccountProfile
|
|
65
|
+
|
|
66
|
+
d = dict(src_dict)
|
|
67
|
+
|
|
68
|
+
def _parse_discord(data: object) -> DiscordAccountProfile | None | Unset:
|
|
69
|
+
if data is None:
|
|
70
|
+
return data
|
|
71
|
+
if isinstance(data, Unset):
|
|
72
|
+
return data
|
|
73
|
+
try:
|
|
74
|
+
if not isinstance(data, dict):
|
|
75
|
+
raise TypeError()
|
|
76
|
+
discord_type_0 = DiscordAccountProfile.from_dict(data)
|
|
77
|
+
|
|
78
|
+
return discord_type_0
|
|
79
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
80
|
+
pass
|
|
81
|
+
return cast(DiscordAccountProfile | None | Unset, data)
|
|
82
|
+
|
|
83
|
+
discord = _parse_discord(d.pop("discord", UNSET))
|
|
84
|
+
|
|
85
|
+
def _parse_microsoft(data: object) -> MicrosoftAccountProfile | None | Unset:
|
|
86
|
+
if data is None:
|
|
87
|
+
return data
|
|
88
|
+
if isinstance(data, Unset):
|
|
89
|
+
return data
|
|
90
|
+
try:
|
|
91
|
+
if not isinstance(data, dict):
|
|
92
|
+
raise TypeError()
|
|
93
|
+
microsoft_type_0 = MicrosoftAccountProfile.from_dict(data)
|
|
94
|
+
|
|
95
|
+
return microsoft_type_0
|
|
96
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
97
|
+
pass
|
|
98
|
+
return cast(MicrosoftAccountProfile | None | Unset, data)
|
|
99
|
+
|
|
100
|
+
microsoft = _parse_microsoft(d.pop("microsoft", UNSET))
|
|
101
|
+
|
|
102
|
+
external_accounts_profile = cls(
|
|
103
|
+
discord=discord,
|
|
104
|
+
microsoft=microsoft,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
external_accounts_profile.additional_properties = d
|
|
108
|
+
return external_accounts_profile
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def additional_keys(self) -> list[str]:
|
|
112
|
+
return list(self.additional_properties.keys())
|
|
113
|
+
|
|
114
|
+
def __getitem__(self, key: str) -> Any:
|
|
115
|
+
return self.additional_properties[key]
|
|
116
|
+
|
|
117
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
118
|
+
self.additional_properties[key] = value
|
|
119
|
+
|
|
120
|
+
def __delitem__(self, key: str) -> None:
|
|
121
|
+
del self.additional_properties[key]
|
|
122
|
+
|
|
123
|
+
def __contains__(self, key: str) -> bool:
|
|
124
|
+
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="GroupMembershipResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GroupMembershipResponse:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
discord_id (int):
|
|
17
|
+
group_key (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
discord_id: int
|
|
21
|
+
group_key: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
discord_id = self.discord_id
|
|
26
|
+
|
|
27
|
+
group_key = self.group_key
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"discord_id": discord_id,
|
|
34
|
+
"group_key": group_key,
|
|
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
|
+
discord_id = d.pop("discord_id")
|
|
44
|
+
|
|
45
|
+
group_key = d.pop("group_key")
|
|
46
|
+
|
|
47
|
+
group_membership_response = cls(
|
|
48
|
+
discord_id=discord_id,
|
|
49
|
+
group_key=group_key,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
group_membership_response.additional_properties = d
|
|
53
|
+
return group_membership_response
|
|
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,63 @@
|
|
|
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
|
+
from ..models.health_status import HealthStatus
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="HealthCheckResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class HealthCheckResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
status (HealthStatus):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
status: HealthStatus
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
status = self.status.value
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"status": status,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
39
|
+
d = dict(src_dict)
|
|
40
|
+
status = HealthStatus(d.pop("status"))
|
|
41
|
+
|
|
42
|
+
health_check_response = cls(
|
|
43
|
+
status=status,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
health_check_response.additional_properties = d
|
|
47
|
+
return health_check_response
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def additional_keys(self) -> list[str]:
|
|
51
|
+
return list(self.additional_properties.keys())
|
|
52
|
+
|
|
53
|
+
def __getitem__(self, key: str) -> Any:
|
|
54
|
+
return self.additional_properties[key]
|
|
55
|
+
|
|
56
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
57
|
+
self.additional_properties[key] = value
|
|
58
|
+
|
|
59
|
+
def __delitem__(self, key: str) -> None:
|
|
60
|
+
del self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __contains__(self, key: str) -> bool:
|
|
63
|
+
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,113 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import 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
|
+
T = TypeVar("T", bound="JobClaimRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class JobClaimRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
kinds (list[str] | None | Unset):
|
|
19
|
+
limit (int | Unset): Default: 1.
|
|
20
|
+
worker (None | str | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
kinds: list[str] | None | Unset = UNSET
|
|
24
|
+
limit: int | Unset = 1
|
|
25
|
+
worker: None | str | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
kinds: list[str] | None | Unset
|
|
30
|
+
if isinstance(self.kinds, Unset):
|
|
31
|
+
kinds = UNSET
|
|
32
|
+
elif isinstance(self.kinds, list):
|
|
33
|
+
kinds = self.kinds
|
|
34
|
+
|
|
35
|
+
else:
|
|
36
|
+
kinds = self.kinds
|
|
37
|
+
|
|
38
|
+
limit = self.limit
|
|
39
|
+
|
|
40
|
+
worker: None | str | Unset
|
|
41
|
+
if isinstance(self.worker, Unset):
|
|
42
|
+
worker = UNSET
|
|
43
|
+
else:
|
|
44
|
+
worker = self.worker
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update({})
|
|
49
|
+
if kinds is not UNSET:
|
|
50
|
+
field_dict["kinds"] = kinds
|
|
51
|
+
if limit is not UNSET:
|
|
52
|
+
field_dict["limit"] = limit
|
|
53
|
+
if worker is not UNSET:
|
|
54
|
+
field_dict["worker"] = worker
|
|
55
|
+
|
|
56
|
+
return field_dict
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
60
|
+
d = dict(src_dict)
|
|
61
|
+
|
|
62
|
+
def _parse_kinds(data: object) -> list[str] | None | Unset:
|
|
63
|
+
if data is None:
|
|
64
|
+
return data
|
|
65
|
+
if isinstance(data, Unset):
|
|
66
|
+
return data
|
|
67
|
+
try:
|
|
68
|
+
if not isinstance(data, list):
|
|
69
|
+
raise TypeError()
|
|
70
|
+
kinds_type_0 = cast(list[str], data)
|
|
71
|
+
|
|
72
|
+
return kinds_type_0
|
|
73
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
74
|
+
pass
|
|
75
|
+
return cast(list[str] | None | Unset, data)
|
|
76
|
+
|
|
77
|
+
kinds = _parse_kinds(d.pop("kinds", UNSET))
|
|
78
|
+
|
|
79
|
+
limit = d.pop("limit", UNSET)
|
|
80
|
+
|
|
81
|
+
def _parse_worker(data: object) -> None | str | Unset:
|
|
82
|
+
if data is None:
|
|
83
|
+
return data
|
|
84
|
+
if isinstance(data, Unset):
|
|
85
|
+
return data
|
|
86
|
+
return cast(None | str | Unset, data)
|
|
87
|
+
|
|
88
|
+
worker = _parse_worker(d.pop("worker", UNSET))
|
|
89
|
+
|
|
90
|
+
job_claim_request = cls(
|
|
91
|
+
kinds=kinds,
|
|
92
|
+
limit=limit,
|
|
93
|
+
worker=worker,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
job_claim_request.additional_properties = d
|
|
97
|
+
return job_claim_request
|
|
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
|