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,149 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
6
|
+
from uuid import UUID
|
|
7
|
+
|
|
8
|
+
from attrs import define as _attrs_define
|
|
9
|
+
from attrs import field as _attrs_field
|
|
10
|
+
|
|
11
|
+
from ..models.application_client_status import ApplicationClientStatus
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.application_client_secret_response import ApplicationClientSecretResponse
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ApplicationClientResponse")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ApplicationClientResponse:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
client_id (str):
|
|
25
|
+
created_at (datetime.datetime):
|
|
26
|
+
description (None | str):
|
|
27
|
+
id (UUID):
|
|
28
|
+
name (str):
|
|
29
|
+
scopes (list[str]):
|
|
30
|
+
secrets (list[ApplicationClientSecretResponse]):
|
|
31
|
+
status (ApplicationClientStatus):
|
|
32
|
+
updated_at (datetime.datetime):
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
client_id: str
|
|
36
|
+
created_at: datetime.datetime
|
|
37
|
+
description: None | str
|
|
38
|
+
id: UUID
|
|
39
|
+
name: str
|
|
40
|
+
scopes: list[str]
|
|
41
|
+
secrets: list[ApplicationClientSecretResponse]
|
|
42
|
+
status: ApplicationClientStatus
|
|
43
|
+
updated_at: datetime.datetime
|
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
45
|
+
|
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
|
47
|
+
client_id = self.client_id
|
|
48
|
+
|
|
49
|
+
created_at = self.created_at.isoformat()
|
|
50
|
+
|
|
51
|
+
description: None | str
|
|
52
|
+
description = self.description
|
|
53
|
+
|
|
54
|
+
id = str(self.id)
|
|
55
|
+
|
|
56
|
+
name = self.name
|
|
57
|
+
|
|
58
|
+
scopes = self.scopes
|
|
59
|
+
|
|
60
|
+
secrets = []
|
|
61
|
+
for secrets_item_data in self.secrets:
|
|
62
|
+
secrets_item = secrets_item_data.to_dict()
|
|
63
|
+
secrets.append(secrets_item)
|
|
64
|
+
|
|
65
|
+
status = self.status.value
|
|
66
|
+
|
|
67
|
+
updated_at = self.updated_at.isoformat()
|
|
68
|
+
|
|
69
|
+
field_dict: dict[str, Any] = {}
|
|
70
|
+
field_dict.update(self.additional_properties)
|
|
71
|
+
field_dict.update(
|
|
72
|
+
{
|
|
73
|
+
"client_id": client_id,
|
|
74
|
+
"created_at": created_at,
|
|
75
|
+
"description": description,
|
|
76
|
+
"id": id,
|
|
77
|
+
"name": name,
|
|
78
|
+
"scopes": scopes,
|
|
79
|
+
"secrets": secrets,
|
|
80
|
+
"status": status,
|
|
81
|
+
"updated_at": updated_at,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return field_dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
89
|
+
from ..models.application_client_secret_response import ApplicationClientSecretResponse
|
|
90
|
+
|
|
91
|
+
d = dict(src_dict)
|
|
92
|
+
client_id = d.pop("client_id")
|
|
93
|
+
|
|
94
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
95
|
+
|
|
96
|
+
def _parse_description(data: object) -> None | str:
|
|
97
|
+
if data is None:
|
|
98
|
+
return data
|
|
99
|
+
return cast(None | str, data)
|
|
100
|
+
|
|
101
|
+
description = _parse_description(d.pop("description"))
|
|
102
|
+
|
|
103
|
+
id = UUID(d.pop("id"))
|
|
104
|
+
|
|
105
|
+
name = d.pop("name")
|
|
106
|
+
|
|
107
|
+
scopes = cast(list[str], d.pop("scopes"))
|
|
108
|
+
|
|
109
|
+
secrets = []
|
|
110
|
+
_secrets = d.pop("secrets")
|
|
111
|
+
for secrets_item_data in _secrets:
|
|
112
|
+
secrets_item = ApplicationClientSecretResponse.from_dict(secrets_item_data)
|
|
113
|
+
|
|
114
|
+
secrets.append(secrets_item)
|
|
115
|
+
|
|
116
|
+
status = ApplicationClientStatus(d.pop("status"))
|
|
117
|
+
|
|
118
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
119
|
+
|
|
120
|
+
application_client_response = cls(
|
|
121
|
+
client_id=client_id,
|
|
122
|
+
created_at=created_at,
|
|
123
|
+
description=description,
|
|
124
|
+
id=id,
|
|
125
|
+
name=name,
|
|
126
|
+
scopes=scopes,
|
|
127
|
+
secrets=secrets,
|
|
128
|
+
status=status,
|
|
129
|
+
updated_at=updated_at,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
application_client_response.additional_properties = d
|
|
133
|
+
return application_client_response
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def additional_keys(self) -> list[str]:
|
|
137
|
+
return list(self.additional_properties.keys())
|
|
138
|
+
|
|
139
|
+
def __getitem__(self, key: str) -> Any:
|
|
140
|
+
return self.additional_properties[key]
|
|
141
|
+
|
|
142
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
143
|
+
self.additional_properties[key] = value
|
|
144
|
+
|
|
145
|
+
def __delitem__(self, key: str) -> None:
|
|
146
|
+
del self.additional_properties[key]
|
|
147
|
+
|
|
148
|
+
def __contains__(self, key: str) -> bool:
|
|
149
|
+
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, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ApplicationClientScopeGrantRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ApplicationClientScopeGrantRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
scopes (list[str]):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
scopes: list[str]
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
scopes = self.scopes
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"scopes": scopes,
|
|
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
|
+
scopes = cast(list[str], d.pop("scopes"))
|
|
39
|
+
|
|
40
|
+
application_client_scope_grant_request = cls(
|
|
41
|
+
scopes=scopes,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
application_client_scope_grant_request.additional_properties = d
|
|
45
|
+
return application_client_scope_grant_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,104 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar, cast
|
|
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
|
+
T = TypeVar("T", bound="ApplicationClientSecretCreateRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class ApplicationClientSecretCreateRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
expires_at (datetime.datetime | None | Unset):
|
|
20
|
+
label (None | str | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
expires_at: datetime.datetime | None | Unset = UNSET
|
|
24
|
+
label: None | str | Unset = UNSET
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
expires_at: None | str | Unset
|
|
29
|
+
if isinstance(self.expires_at, Unset):
|
|
30
|
+
expires_at = UNSET
|
|
31
|
+
elif isinstance(self.expires_at, datetime.datetime):
|
|
32
|
+
expires_at = self.expires_at.isoformat()
|
|
33
|
+
else:
|
|
34
|
+
expires_at = self.expires_at
|
|
35
|
+
|
|
36
|
+
label: None | str | Unset
|
|
37
|
+
if isinstance(self.label, Unset):
|
|
38
|
+
label = UNSET
|
|
39
|
+
else:
|
|
40
|
+
label = self.label
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update({})
|
|
45
|
+
if expires_at is not UNSET:
|
|
46
|
+
field_dict["expires_at"] = expires_at
|
|
47
|
+
if label is not UNSET:
|
|
48
|
+
field_dict["label"] = label
|
|
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
|
+
|
|
56
|
+
def _parse_expires_at(data: object) -> datetime.datetime | None | Unset:
|
|
57
|
+
if data is None:
|
|
58
|
+
return data
|
|
59
|
+
if isinstance(data, Unset):
|
|
60
|
+
return data
|
|
61
|
+
try:
|
|
62
|
+
if not isinstance(data, str):
|
|
63
|
+
raise TypeError()
|
|
64
|
+
expires_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
65
|
+
|
|
66
|
+
return expires_at_type_0
|
|
67
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
68
|
+
pass
|
|
69
|
+
return cast(datetime.datetime | None | Unset, data)
|
|
70
|
+
|
|
71
|
+
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
|
72
|
+
|
|
73
|
+
def _parse_label(data: object) -> None | str | Unset:
|
|
74
|
+
if data is None:
|
|
75
|
+
return data
|
|
76
|
+
if isinstance(data, Unset):
|
|
77
|
+
return data
|
|
78
|
+
return cast(None | str | Unset, data)
|
|
79
|
+
|
|
80
|
+
label = _parse_label(d.pop("label", UNSET))
|
|
81
|
+
|
|
82
|
+
application_client_secret_create_request = cls(
|
|
83
|
+
expires_at=expires_at,
|
|
84
|
+
label=label,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
application_client_secret_create_request.additional_properties = d
|
|
88
|
+
return application_client_secret_create_request
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def additional_keys(self) -> list[str]:
|
|
92
|
+
return list(self.additional_properties.keys())
|
|
93
|
+
|
|
94
|
+
def __getitem__(self, key: str) -> Any:
|
|
95
|
+
return self.additional_properties[key]
|
|
96
|
+
|
|
97
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
98
|
+
self.additional_properties[key] = value
|
|
99
|
+
|
|
100
|
+
def __delitem__(self, key: str) -> None:
|
|
101
|
+
del self.additional_properties[key]
|
|
102
|
+
|
|
103
|
+
def __contains__(self, key: str) -> bool:
|
|
104
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar, cast
|
|
6
|
+
from uuid import UUID
|
|
7
|
+
|
|
8
|
+
from attrs import define as _attrs_define
|
|
9
|
+
from attrs import field as _attrs_field
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="ApplicationClientSecretResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ApplicationClientSecretResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
created_at (datetime.datetime):
|
|
19
|
+
expires_at (datetime.datetime | None):
|
|
20
|
+
id (UUID):
|
|
21
|
+
label (None | str):
|
|
22
|
+
last_used_at (datetime.datetime | None):
|
|
23
|
+
revoked_at (datetime.datetime | None):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
created_at: datetime.datetime
|
|
27
|
+
expires_at: datetime.datetime | None
|
|
28
|
+
id: UUID
|
|
29
|
+
label: None | str
|
|
30
|
+
last_used_at: datetime.datetime | None
|
|
31
|
+
revoked_at: datetime.datetime | None
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
created_at = self.created_at.isoformat()
|
|
36
|
+
|
|
37
|
+
expires_at: None | str
|
|
38
|
+
if isinstance(self.expires_at, datetime.datetime):
|
|
39
|
+
expires_at = self.expires_at.isoformat()
|
|
40
|
+
else:
|
|
41
|
+
expires_at = self.expires_at
|
|
42
|
+
|
|
43
|
+
id = str(self.id)
|
|
44
|
+
|
|
45
|
+
label: None | str
|
|
46
|
+
label = self.label
|
|
47
|
+
|
|
48
|
+
last_used_at: None | str
|
|
49
|
+
if isinstance(self.last_used_at, datetime.datetime):
|
|
50
|
+
last_used_at = self.last_used_at.isoformat()
|
|
51
|
+
else:
|
|
52
|
+
last_used_at = self.last_used_at
|
|
53
|
+
|
|
54
|
+
revoked_at: None | str
|
|
55
|
+
if isinstance(self.revoked_at, datetime.datetime):
|
|
56
|
+
revoked_at = self.revoked_at.isoformat()
|
|
57
|
+
else:
|
|
58
|
+
revoked_at = self.revoked_at
|
|
59
|
+
|
|
60
|
+
field_dict: dict[str, Any] = {}
|
|
61
|
+
field_dict.update(self.additional_properties)
|
|
62
|
+
field_dict.update(
|
|
63
|
+
{
|
|
64
|
+
"created_at": created_at,
|
|
65
|
+
"expires_at": expires_at,
|
|
66
|
+
"id": id,
|
|
67
|
+
"label": label,
|
|
68
|
+
"last_used_at": last_used_at,
|
|
69
|
+
"revoked_at": revoked_at,
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return field_dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
79
|
+
|
|
80
|
+
def _parse_expires_at(data: object) -> datetime.datetime | None:
|
|
81
|
+
if data is None:
|
|
82
|
+
return data
|
|
83
|
+
try:
|
|
84
|
+
if not isinstance(data, str):
|
|
85
|
+
raise TypeError()
|
|
86
|
+
expires_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
87
|
+
|
|
88
|
+
return expires_at_type_0
|
|
89
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
90
|
+
pass
|
|
91
|
+
return cast(datetime.datetime | None, data)
|
|
92
|
+
|
|
93
|
+
expires_at = _parse_expires_at(d.pop("expires_at"))
|
|
94
|
+
|
|
95
|
+
id = UUID(d.pop("id"))
|
|
96
|
+
|
|
97
|
+
def _parse_label(data: object) -> None | str:
|
|
98
|
+
if data is None:
|
|
99
|
+
return data
|
|
100
|
+
return cast(None | str, data)
|
|
101
|
+
|
|
102
|
+
label = _parse_label(d.pop("label"))
|
|
103
|
+
|
|
104
|
+
def _parse_last_used_at(data: object) -> datetime.datetime | None:
|
|
105
|
+
if data is None:
|
|
106
|
+
return data
|
|
107
|
+
try:
|
|
108
|
+
if not isinstance(data, str):
|
|
109
|
+
raise TypeError()
|
|
110
|
+
last_used_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
111
|
+
|
|
112
|
+
return last_used_at_type_0
|
|
113
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
114
|
+
pass
|
|
115
|
+
return cast(datetime.datetime | None, data)
|
|
116
|
+
|
|
117
|
+
last_used_at = _parse_last_used_at(d.pop("last_used_at"))
|
|
118
|
+
|
|
119
|
+
def _parse_revoked_at(data: object) -> datetime.datetime | None:
|
|
120
|
+
if data is None:
|
|
121
|
+
return data
|
|
122
|
+
try:
|
|
123
|
+
if not isinstance(data, str):
|
|
124
|
+
raise TypeError()
|
|
125
|
+
revoked_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
126
|
+
|
|
127
|
+
return revoked_at_type_0
|
|
128
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
129
|
+
pass
|
|
130
|
+
return cast(datetime.datetime | None, data)
|
|
131
|
+
|
|
132
|
+
revoked_at = _parse_revoked_at(d.pop("revoked_at"))
|
|
133
|
+
|
|
134
|
+
application_client_secret_response = cls(
|
|
135
|
+
created_at=created_at,
|
|
136
|
+
expires_at=expires_at,
|
|
137
|
+
id=id,
|
|
138
|
+
label=label,
|
|
139
|
+
last_used_at=last_used_at,
|
|
140
|
+
revoked_at=revoked_at,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
application_client_secret_response.additional_properties = d
|
|
144
|
+
return application_client_secret_response
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def additional_keys(self) -> list[str]:
|
|
148
|
+
return list(self.additional_properties.keys())
|
|
149
|
+
|
|
150
|
+
def __getitem__(self, key: str) -> Any:
|
|
151
|
+
return self.additional_properties[key]
|
|
152
|
+
|
|
153
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
154
|
+
self.additional_properties[key] = value
|
|
155
|
+
|
|
156
|
+
def __delitem__(self, key: str) -> None:
|
|
157
|
+
del self.additional_properties[key]
|
|
158
|
+
|
|
159
|
+
def __contains__(self, key: str) -> bool:
|
|
160
|
+
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 Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.application_client_status import ApplicationClientStatus
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="ApplicationClientUpdateRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class ApplicationClientUpdateRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
description (None | str | Unset):
|
|
20
|
+
name (None | str | Unset):
|
|
21
|
+
status (ApplicationClientStatus | None | Unset):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
description: None | str | Unset = UNSET
|
|
25
|
+
name: None | str | Unset = UNSET
|
|
26
|
+
status: ApplicationClientStatus | None | Unset = UNSET
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
description: None | str | Unset
|
|
31
|
+
if isinstance(self.description, Unset):
|
|
32
|
+
description = UNSET
|
|
33
|
+
else:
|
|
34
|
+
description = self.description
|
|
35
|
+
|
|
36
|
+
name: None | str | Unset
|
|
37
|
+
if isinstance(self.name, Unset):
|
|
38
|
+
name = UNSET
|
|
39
|
+
else:
|
|
40
|
+
name = self.name
|
|
41
|
+
|
|
42
|
+
status: None | str | Unset
|
|
43
|
+
if isinstance(self.status, Unset):
|
|
44
|
+
status = UNSET
|
|
45
|
+
elif isinstance(self.status, ApplicationClientStatus):
|
|
46
|
+
status = self.status.value
|
|
47
|
+
else:
|
|
48
|
+
status = self.status
|
|
49
|
+
|
|
50
|
+
field_dict: dict[str, Any] = {}
|
|
51
|
+
field_dict.update(self.additional_properties)
|
|
52
|
+
field_dict.update({})
|
|
53
|
+
if description is not UNSET:
|
|
54
|
+
field_dict["description"] = description
|
|
55
|
+
if name is not UNSET:
|
|
56
|
+
field_dict["name"] = name
|
|
57
|
+
if status is not UNSET:
|
|
58
|
+
field_dict["status"] = status
|
|
59
|
+
|
|
60
|
+
return field_dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
|
|
66
|
+
def _parse_description(data: object) -> None | str | Unset:
|
|
67
|
+
if data is None:
|
|
68
|
+
return data
|
|
69
|
+
if isinstance(data, Unset):
|
|
70
|
+
return data
|
|
71
|
+
return cast(None | str | Unset, data)
|
|
72
|
+
|
|
73
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
74
|
+
|
|
75
|
+
def _parse_name(data: object) -> None | str | Unset:
|
|
76
|
+
if data is None:
|
|
77
|
+
return data
|
|
78
|
+
if isinstance(data, Unset):
|
|
79
|
+
return data
|
|
80
|
+
return cast(None | str | Unset, data)
|
|
81
|
+
|
|
82
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
83
|
+
|
|
84
|
+
def _parse_status(data: object) -> ApplicationClientStatus | None | Unset:
|
|
85
|
+
if data is None:
|
|
86
|
+
return data
|
|
87
|
+
if isinstance(data, Unset):
|
|
88
|
+
return data
|
|
89
|
+
try:
|
|
90
|
+
if not isinstance(data, str):
|
|
91
|
+
raise TypeError()
|
|
92
|
+
status_type_0 = ApplicationClientStatus(data)
|
|
93
|
+
|
|
94
|
+
return status_type_0
|
|
95
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
96
|
+
pass
|
|
97
|
+
return cast(ApplicationClientStatus | None | Unset, data)
|
|
98
|
+
|
|
99
|
+
status = _parse_status(d.pop("status", UNSET))
|
|
100
|
+
|
|
101
|
+
application_client_update_request = cls(
|
|
102
|
+
description=description,
|
|
103
|
+
name=name,
|
|
104
|
+
status=status,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
application_client_update_request.additional_properties = d
|
|
108
|
+
return application_client_update_request
|
|
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,78 @@
|
|
|
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
|
+
T = TypeVar("T", bound="AuthorizationCheckRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class AuthorizationCheckRequest:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
action_key (str):
|
|
18
|
+
actor_discord_id (int):
|
|
19
|
+
target_party_id (UUID):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
action_key: str
|
|
23
|
+
actor_discord_id: int
|
|
24
|
+
target_party_id: UUID
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
action_key = self.action_key
|
|
29
|
+
|
|
30
|
+
actor_discord_id = self.actor_discord_id
|
|
31
|
+
|
|
32
|
+
target_party_id = str(self.target_party_id)
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"action_key": action_key,
|
|
39
|
+
"actor_discord_id": actor_discord_id,
|
|
40
|
+
"target_party_id": target_party_id,
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
action_key = d.pop("action_key")
|
|
50
|
+
|
|
51
|
+
actor_discord_id = d.pop("actor_discord_id")
|
|
52
|
+
|
|
53
|
+
target_party_id = UUID(d.pop("target_party_id"))
|
|
54
|
+
|
|
55
|
+
authorization_check_request = cls(
|
|
56
|
+
action_key=action_key,
|
|
57
|
+
actor_discord_id=actor_discord_id,
|
|
58
|
+
target_party_id=target_party_id,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
authorization_check_request.additional_properties = d
|
|
62
|
+
return authorization_check_request
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> list[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|