refactor: add polylan-aandt generated client

This commit is contained in:
2026-09-16 15:36:51 +02:00
parent fabf06e6d4
commit 9ec9a54649
73 changed files with 7000 additions and 125 deletions
@@ -0,0 +1,117 @@
"""Contains all the data models used in inputs/outputs"""
from .a_and_t_infos import AAndTInfos
from .a_and_t_infos_status import AAndTInfosStatus
from .aandt_api_apibot_get_response_200 import AandtApiApibotGetResponse200
from .aandt_api_apibot_get_response_401 import AandtApiApibotGetResponse401
from .aandt_api_apibot_set_body import AandtApiApibotSetBody
from .aandt_api_apibot_set_response_401 import AandtApiApibotSetResponse401
from .aandt_api_infos_response_200 import AandtApiInfosResponse200
from .aandt_api_infos_response_401 import AandtApiInfosResponse401
from .aandt_api_log_body import AandtApiLogBody
from .aandt_api_log_response_401 import AandtApiLogResponse401
from .aandt_api_match_messages_get_response_200 import (
AandtApiMatchMessagesGetResponse200,
)
from .aandt_api_match_messages_get_response_401 import (
AandtApiMatchMessagesGetResponse401,
)
from .aandt_api_match_messages_set_body import AandtApiMatchMessagesSetBody
from .aandt_api_match_messages_set_response_401 import (
AandtApiMatchMessagesSetResponse401,
)
from .aandt_api_match_metadata_get_response_200 import (
AandtApiMatchMetadataGetResponse200,
)
from .aandt_api_match_metadata_get_response_401 import (
AandtApiMatchMetadataGetResponse401,
)
from .aandt_api_match_metadata_set_body import AandtApiMatchMetadataSetBody
from .aandt_api_match_metadata_set_response_401 import (
AandtApiMatchMetadataSetResponse401,
)
from .aandt_api_match_submit_results_body import AandtApiMatchSubmitResultsBody
from .aandt_api_match_submit_results_body_results import (
AandtApiMatchSubmitResultsBodyResults,
)
from .aandt_api_match_submit_results_response_200 import (
AandtApiMatchSubmitResultsResponse200,
)
from .aandt_api_match_submit_results_response_200_message import (
AandtApiMatchSubmitResultsResponse200Message,
)
from .aandt_api_match_submit_results_response_401 import (
AandtApiMatchSubmitResultsResponse401,
)
from .aandt_api_matches_response_200 import AandtApiMatchesResponse200
from .aandt_api_matches_response_401 import AandtApiMatchesResponse401
from .aandt_api_members_response_200 import AandtApiMembersResponse200
from .aandt_api_members_response_401 import AandtApiMembersResponse401
from .aandt_api_message_get_response_200 import AandtApiMessageGetResponse200
from .aandt_api_message_get_response_401 import AandtApiMessageGetResponse401
from .aandt_api_message_set_body import AandtApiMessageSetBody
from .aandt_api_message_set_response_401 import AandtApiMessageSetResponse401
from .aandt_api_metadata_get_response_200 import AandtApiMetadataGetResponse200
from .aandt_api_metadata_get_response_401 import AandtApiMetadataGetResponse401
from .aandt_api_metadata_set_body import AandtApiMetadataSetBody
from .aandt_api_metadata_set_response_401 import AandtApiMetadataSetResponse401
from .match import Match
from .match_multiround_modes import MatchMultiroundModes
from .match_players import MatchPlayers
from .match_round import MatchRound
from .match_round_result import MatchRoundResult
from .match_status import MatchStatus
from .member import Member
from .member_team import MemberTeam
from .member_user import MemberUser
from .metadata import Metadata
from .success_response import SuccessResponse
__all__ = (
"AAndTInfos",
"AAndTInfosStatus",
"AandtApiApibotGetResponse200",
"AandtApiApibotGetResponse401",
"AandtApiApibotSetBody",
"AandtApiApibotSetResponse401",
"AandtApiInfosResponse200",
"AandtApiInfosResponse401",
"AandtApiLogBody",
"AandtApiLogResponse401",
"AandtApiMatchMessagesGetResponse200",
"AandtApiMatchMessagesGetResponse401",
"AandtApiMatchMessagesSetBody",
"AandtApiMatchMessagesSetResponse401",
"AandtApiMatchMetadataGetResponse200",
"AandtApiMatchMetadataGetResponse401",
"AandtApiMatchMetadataSetBody",
"AandtApiMatchMetadataSetResponse401",
"AandtApiMatchSubmitResultsBody",
"AandtApiMatchSubmitResultsBodyResults",
"AandtApiMatchSubmitResultsResponse200",
"AandtApiMatchSubmitResultsResponse200Message",
"AandtApiMatchSubmitResultsResponse401",
"AandtApiMatchesResponse200",
"AandtApiMatchesResponse401",
"AandtApiMembersResponse200",
"AandtApiMembersResponse401",
"AandtApiMessageGetResponse200",
"AandtApiMessageGetResponse401",
"AandtApiMessageSetBody",
"AandtApiMessageSetResponse401",
"AandtApiMetadataGetResponse200",
"AandtApiMetadataGetResponse401",
"AandtApiMetadataSetBody",
"AandtApiMetadataSetResponse401",
"Match",
"MatchMultiroundModes",
"MatchPlayers",
"MatchRound",
"MatchRoundResult",
"MatchStatus",
"Member",
"MemberTeam",
"MemberUser",
"Metadata",
"SuccessResponse",
)
@@ -0,0 +1,106 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..models.a_and_t_infos_status import AAndTInfosStatus
from ..types import UNSET, Unset
T = TypeVar("T", bound="AAndTInfos")
@_attrs_define
class AAndTInfos:
"""
Attributes:
name (str | Unset):
status (AAndTInfosStatus | Unset):
status_display (str | Unset): Example: Matchs en cours.
use_teams (bool | Unset):
max_entities (int | Unset):
"""
name: str | Unset = UNSET
status: AAndTInfosStatus | Unset = UNSET
status_display: str | Unset = UNSET
use_teams: bool | Unset = UNSET
max_entities: int | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
name = self.name
status: str | Unset = UNSET
if not isinstance(self.status, Unset):
status = self.status.value
status_display = self.status_display
use_teams = self.use_teams
max_entities = self.max_entities
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if name is not UNSET:
field_dict["name"] = name
if status is not UNSET:
field_dict["status"] = status
if status_display is not UNSET:
field_dict["status_display"] = status_display
if use_teams is not UNSET:
field_dict["use_teams"] = use_teams
if max_entities is not UNSET:
field_dict["max_entities"] = max_entities
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
name = d.pop("name", UNSET)
_status = d.pop("status", UNSET)
status: AAndTInfosStatus | Unset
if isinstance(_status, Unset):
status = UNSET
else:
status = AAndTInfosStatus(_status)
status_display = d.pop("status_display", UNSET)
use_teams = d.pop("use_teams", UNSET)
max_entities = d.pop("max_entities", UNSET)
a_and_t_infos = cls(
name=name,
status=status,
status_display=status_display,
use_teams=use_teams,
max_entities=max_entities,
)
a_and_t_infos.additional_properties = d
return a_and_t_infos
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,14 @@
from enum import StrEnum
class AAndTInfosStatus(StrEnum):
VALUE_0 = "0prep"
VALUE_1 = "1publ"
VALUE_2 = "3insc"
VALUE_3 = "5inscdone"
VALUE_4 = "7inprog"
VALUE_5 = "9done"
VALUE_6 = "11reviewed"
def __str__(self) -> str:
return str(self.value)
@@ -0,0 +1,71 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiApibotGetResponse200")
@_attrs_define
class AandtApiApibotGetResponse200:
"""
Attributes:
activated (bool | Unset):
name (str | Unset):
"""
activated: bool | Unset = UNSET
name: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
activated = self.activated
name = self.name
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if activated is not UNSET:
field_dict["activated"] = activated
if name is not UNSET:
field_dict["name"] = name
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
activated = d.pop("activated", UNSET)
name = d.pop("name", UNSET)
aandt_api_apibot_get_response_200 = cls(
activated=activated,
name=name,
)
aandt_api_apibot_get_response_200.additional_properties = d
return aandt_api_apibot_get_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiApibotGetResponse401")
@_attrs_define
class AandtApiApibotGetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_apibot_get_response_401 = cls(
message=message,
)
aandt_api_apibot_get_response_401.additional_properties = d
return aandt_api_apibot_get_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,71 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiApibotSetBody")
@_attrs_define
class AandtApiApibotSetBody:
"""
Attributes:
activated (bool | Unset):
name (str | Unset):
"""
activated: bool | Unset = UNSET
name: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
activated = self.activated
name = self.name
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if activated is not UNSET:
field_dict["activated"] = activated
if name is not UNSET:
field_dict["name"] = name
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
activated = d.pop("activated", UNSET)
name = d.pop("name", UNSET)
aandt_api_apibot_set_body = cls(
activated=activated,
name=name,
)
aandt_api_apibot_set_body.additional_properties = d
return aandt_api_apibot_set_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiApibotSetResponse401")
@_attrs_define
class AandtApiApibotSetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_apibot_set_response_401 = cls(
message=message,
)
aandt_api_apibot_set_response_401.additional_properties = d
return aandt_api_apibot_set_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,75 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.a_and_t_infos import AAndTInfos
T = TypeVar("T", bound="AandtApiInfosResponse200")
@_attrs_define
class AandtApiInfosResponse200:
"""
Attributes:
aandt (AAndTInfos | Unset):
"""
aandt: AAndTInfos | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
aandt: dict[str, Any] | Unset = UNSET
if not isinstance(self.aandt, Unset):
aandt = self.aandt.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if aandt is not UNSET:
field_dict["aandt"] = aandt
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.a_and_t_infos import AAndTInfos
d = dict(src_dict)
_aandt = d.pop("aandt", UNSET)
aandt: AAndTInfos | Unset
if isinstance(_aandt, Unset):
aandt = UNSET
else:
aandt = AAndTInfos.from_dict(_aandt)
aandt_api_infos_response_200 = cls(
aandt=aandt,
)
aandt_api_infos_response_200.additional_properties = d
return aandt_api_infos_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiInfosResponse401")
@_attrs_define
class AandtApiInfosResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_infos_response_401 = cls(
message=message,
)
aandt_api_infos_response_401.additional_properties = d
return aandt_api_infos_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,70 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
T = TypeVar("T", bound="AandtApiLogBody")
@_attrs_define
class AandtApiLogBody:
"""
Attributes:
type_ (str): AAndTLog type, e.g. "info", "error"
message (str):
"""
type_: str
message: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
type_ = self.type_
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"type": type_,
"message": message,
}
)
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
type_ = d.pop("type")
message = d.pop("message")
aandt_api_log_body = cls(
type_=type_,
message=message,
)
aandt_api_log_body.additional_properties = d
return aandt_api_log_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiLogResponse401")
@_attrs_define
class AandtApiLogResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_log_response_401 = cls(
message=message,
)
aandt_api_log_response_401.additional_properties = d
return aandt_api_log_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,114 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMessagesGetResponse200")
@_attrs_define
class AandtApiMatchMessagesGetResponse200:
"""
Attributes:
all_ (None | str | Unset):
players (None | str | Unset):
admin (None | str | Unset):
"""
all_: None | str | Unset = UNSET
players: None | str | Unset = UNSET
admin: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
all_: None | str | Unset
if isinstance(self.all_, Unset):
all_ = UNSET
else:
all_ = self.all_
players: None | str | Unset
if isinstance(self.players, Unset):
players = UNSET
else:
players = self.players
admin: None | str | Unset
if isinstance(self.admin, Unset):
admin = UNSET
else:
admin = self.admin
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if all_ is not UNSET:
field_dict["all"] = all_
if players is not UNSET:
field_dict["players"] = players
if admin is not UNSET:
field_dict["admin"] = admin
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
def _parse_all_(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
all_ = _parse_all_(d.pop("all", UNSET))
def _parse_players(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
players = _parse_players(d.pop("players", UNSET))
def _parse_admin(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
admin = _parse_admin(d.pop("admin", UNSET))
aandt_api_match_messages_get_response_200 = cls(
all_=all_,
players=players,
admin=admin,
)
aandt_api_match_messages_get_response_200.additional_properties = d
return aandt_api_match_messages_get_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMessagesGetResponse401")
@_attrs_define
class AandtApiMatchMessagesGetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_match_messages_get_response_401 = cls(
message=message,
)
aandt_api_match_messages_get_response_401.additional_properties = d
return aandt_api_match_messages_get_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,80 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMessagesSetBody")
@_attrs_define
class AandtApiMatchMessagesSetBody:
"""
Attributes:
all_ (str | Unset):
players (str | Unset):
admin (str | Unset):
"""
all_: str | Unset = UNSET
players: str | Unset = UNSET
admin: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
all_ = self.all_
players = self.players
admin = self.admin
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if all_ is not UNSET:
field_dict["all"] = all_
if players is not UNSET:
field_dict["players"] = players
if admin is not UNSET:
field_dict["admin"] = admin
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
all_ = d.pop("all", UNSET)
players = d.pop("players", UNSET)
admin = d.pop("admin", UNSET)
aandt_api_match_messages_set_body = cls(
all_=all_,
players=players,
admin=admin,
)
aandt_api_match_messages_set_body.additional_properties = d
return aandt_api_match_messages_set_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMessagesSetResponse401")
@_attrs_define
class AandtApiMatchMessagesSetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_match_messages_set_response_401 = cls(
message=message,
)
aandt_api_match_messages_set_response_401.additional_properties = d
return aandt_api_match_messages_set_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,75 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.metadata import Metadata
T = TypeVar("T", bound="AandtApiMatchMetadataGetResponse200")
@_attrs_define
class AandtApiMatchMetadataGetResponse200:
"""
Attributes:
metadata (Metadata | Unset): Arbitrary JSON metadata stored by the bot
"""
metadata: Metadata | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
metadata: dict[str, Any] | Unset = UNSET
if not isinstance(self.metadata, Unset):
metadata = self.metadata.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if metadata is not UNSET:
field_dict["metadata"] = metadata
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.metadata import Metadata
d = dict(src_dict)
_metadata = d.pop("metadata", UNSET)
metadata: Metadata | Unset
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = Metadata.from_dict(_metadata)
aandt_api_match_metadata_get_response_200 = cls(
metadata=metadata,
)
aandt_api_match_metadata_get_response_200.additional_properties = d
return aandt_api_match_metadata_get_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMetadataGetResponse401")
@_attrs_define
class AandtApiMatchMetadataGetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_match_metadata_get_response_401 = cls(
message=message,
)
aandt_api_match_metadata_get_response_401.additional_properties = d
return aandt_api_match_metadata_get_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,75 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.metadata import Metadata
T = TypeVar("T", bound="AandtApiMatchMetadataSetBody")
@_attrs_define
class AandtApiMatchMetadataSetBody:
"""
Attributes:
metadata (Metadata | Unset): Arbitrary JSON metadata stored by the bot
"""
metadata: Metadata | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
metadata: dict[str, Any] | Unset = UNSET
if not isinstance(self.metadata, Unset):
metadata = self.metadata.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if metadata is not UNSET:
field_dict["metadata"] = metadata
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.metadata import Metadata
d = dict(src_dict)
_metadata = d.pop("metadata", UNSET)
metadata: Metadata | Unset
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = Metadata.from_dict(_metadata)
aandt_api_match_metadata_set_body = cls(
metadata=metadata,
)
aandt_api_match_metadata_set_body.additional_properties = d
return aandt_api_match_metadata_set_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchMetadataSetResponse401")
@_attrs_define
class AandtApiMatchMetadataSetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_match_metadata_set_response_401 = cls(
message=message,
)
aandt_api_match_metadata_set_response_401.additional_properties = d
return aandt_api_match_metadata_set_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,80 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
if TYPE_CHECKING:
from ..models.aandt_api_match_submit_results_body_results import (
AandtApiMatchSubmitResultsBodyResults,
)
T = TypeVar("T", bound="AandtApiMatchSubmitResultsBody")
@_attrs_define
class AandtApiMatchSubmitResultsBody:
"""
Attributes:
round_ (int):
results (AandtApiMatchSubmitResultsBodyResults): map of MatschHasPlayerOrTeam pk (string) -> score (int)
"""
round_: int
results: AandtApiMatchSubmitResultsBodyResults
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
round_ = self.round_
results = self.results.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"round": round_,
"results": results,
}
)
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.aandt_api_match_submit_results_body_results import (
AandtApiMatchSubmitResultsBodyResults,
)
d = dict(src_dict)
round_ = d.pop("round")
results = AandtApiMatchSubmitResultsBodyResults.from_dict(d.pop("results"))
aandt_api_match_submit_results_body = cls(
round_=round_,
results=results,
)
aandt_api_match_submit_results_body.additional_properties = d
return aandt_api_match_submit_results_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,48 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
T = TypeVar("T", bound="AandtApiMatchSubmitResultsBodyResults")
@_attrs_define
class AandtApiMatchSubmitResultsBodyResults:
"""map of MatschHasPlayerOrTeam pk (string) -> score (int)"""
additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
aandt_api_match_submit_results_body_results = cls()
aandt_api_match_submit_results_body_results.additional_properties = d
return aandt_api_match_submit_results_body_results
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> int:
return self.additional_properties[key]
def __setitem__(self, key: str, value: int) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,81 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..models.aandt_api_match_submit_results_response_200_message import (
AandtApiMatchSubmitResultsResponse200Message,
)
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchSubmitResultsResponse200")
@_attrs_define
class AandtApiMatchSubmitResultsResponse200:
"""
Attributes:
success (bool | Unset):
message (AandtApiMatchSubmitResultsResponse200Message | Unset):
"""
success: bool | Unset = UNSET
message: AandtApiMatchSubmitResultsResponse200Message | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
success = self.success
message: str | Unset = UNSET
if not isinstance(self.message, Unset):
message = self.message.value
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if success is not UNSET:
field_dict["success"] = success
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
success = d.pop("success", UNSET)
_message = d.pop("message", UNSET)
message: AandtApiMatchSubmitResultsResponse200Message | Unset
if isinstance(_message, Unset):
message = UNSET
else:
message = AandtApiMatchSubmitResultsResponse200Message(_message)
aandt_api_match_submit_results_response_200 = cls(
success=success,
message=message,
)
aandt_api_match_submit_results_response_200.additional_properties = d
return aandt_api_match_submit_results_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,9 @@
from enum import StrEnum
class AandtApiMatchSubmitResultsResponse200Message(StrEnum):
MISSING_PARAMETERS = "Missing parameters"
WRONG_ROUND = "Wrong round"
def __str__(self) -> str:
return str(self.value)
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchSubmitResultsResponse401")
@_attrs_define
class AandtApiMatchSubmitResultsResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_match_submit_results_response_401 = cls(
message=message,
)
aandt_api_match_submit_results_response_401.additional_properties = d
return aandt_api_match_submit_results_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,80 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.match import Match
T = TypeVar("T", bound="AandtApiMatchesResponse200")
@_attrs_define
class AandtApiMatchesResponse200:
"""
Attributes:
matches (list[Match] | Unset):
"""
matches: list[Match] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
matches: list[dict[str, Any]] | Unset = UNSET
if not isinstance(self.matches, Unset):
matches = []
for matches_item_data in self.matches:
matches_item = matches_item_data.to_dict()
matches.append(matches_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if matches is not UNSET:
field_dict["matches"] = matches
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.match import Match
d = dict(src_dict)
_matches = d.pop("matches", UNSET)
matches: list[Match] | Unset = UNSET
if _matches is not UNSET:
matches = []
for matches_item_data in _matches:
matches_item = Match.from_dict(matches_item_data)
matches.append(matches_item)
aandt_api_matches_response_200 = cls(
matches=matches,
)
aandt_api_matches_response_200.additional_properties = d
return aandt_api_matches_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMatchesResponse401")
@_attrs_define
class AandtApiMatchesResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_matches_response_401 = cls(
message=message,
)
aandt_api_matches_response_401.additional_properties = d
return aandt_api_matches_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,80 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.member import Member
T = TypeVar("T", bound="AandtApiMembersResponse200")
@_attrs_define
class AandtApiMembersResponse200:
"""
Attributes:
members (list[Member] | Unset):
"""
members: list[Member] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
members: list[dict[str, Any]] | Unset = UNSET
if not isinstance(self.members, Unset):
members = []
for members_item_data in self.members:
members_item = members_item_data.to_dict()
members.append(members_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if members is not UNSET:
field_dict["members"] = members
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.member import Member
d = dict(src_dict)
_members = d.pop("members", UNSET)
members: list[Member] | Unset = UNSET
if _members is not UNSET:
members = []
for members_item_data in _members:
members_item = Member.from_dict(members_item_data)
members.append(members_item)
aandt_api_members_response_200 = cls(
members=members,
)
aandt_api_members_response_200.additional_properties = d
return aandt_api_members_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMembersResponse401")
@_attrs_define
class AandtApiMembersResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_members_response_401 = cls(
message=message,
)
aandt_api_members_response_401.additional_properties = d
return aandt_api_members_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,74 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMessageGetResponse200")
@_attrs_define
class AandtApiMessageGetResponse200:
"""
Attributes:
message (None | str | Unset):
"""
message: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message: None | str | Unset
if isinstance(self.message, Unset):
message = UNSET
else:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
def _parse_message(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
message = _parse_message(d.pop("message", UNSET))
aandt_api_message_get_response_200 = cls(
message=message,
)
aandt_api_message_get_response_200.additional_properties = d
return aandt_api_message_get_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMessageGetResponse401")
@_attrs_define
class AandtApiMessageGetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_message_get_response_401 = cls(
message=message,
)
aandt_api_message_get_response_401.additional_properties = d
return aandt_api_message_get_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMessageSetBody")
@_attrs_define
class AandtApiMessageSetBody:
"""
Attributes:
message (str | Unset):
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_message_set_body = cls(
message=message,
)
aandt_api_message_set_body.additional_properties = d
return aandt_api_message_set_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMessageSetResponse401")
@_attrs_define
class AandtApiMessageSetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_message_set_response_401 = cls(
message=message,
)
aandt_api_message_set_response_401.additional_properties = d
return aandt_api_message_set_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,75 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.metadata import Metadata
T = TypeVar("T", bound="AandtApiMetadataGetResponse200")
@_attrs_define
class AandtApiMetadataGetResponse200:
"""
Attributes:
metadata (Metadata | Unset): Arbitrary JSON metadata stored by the bot
"""
metadata: Metadata | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
metadata: dict[str, Any] | Unset = UNSET
if not isinstance(self.metadata, Unset):
metadata = self.metadata.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if metadata is not UNSET:
field_dict["metadata"] = metadata
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.metadata import Metadata
d = dict(src_dict)
_metadata = d.pop("metadata", UNSET)
metadata: Metadata | Unset
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = Metadata.from_dict(_metadata)
aandt_api_metadata_get_response_200 = cls(
metadata=metadata,
)
aandt_api_metadata_get_response_200.additional_properties = d
return aandt_api_metadata_get_response_200
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMetadataGetResponse401")
@_attrs_define
class AandtApiMetadataGetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_metadata_get_response_401 = cls(
message=message,
)
aandt_api_metadata_get_response_401.additional_properties = d
return aandt_api_metadata_get_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,75 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.metadata import Metadata
T = TypeVar("T", bound="AandtApiMetadataSetBody")
@_attrs_define
class AandtApiMetadataSetBody:
"""
Attributes:
metadata (Metadata | Unset): Arbitrary JSON metadata stored by the bot
"""
metadata: Metadata | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
metadata: dict[str, Any] | Unset = UNSET
if not isinstance(self.metadata, Unset):
metadata = self.metadata.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if metadata is not UNSET:
field_dict["metadata"] = metadata
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.metadata import Metadata
d = dict(src_dict)
_metadata = d.pop("metadata", UNSET)
metadata: Metadata | Unset
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = Metadata.from_dict(_metadata)
aandt_api_metadata_set_body = cls(
metadata=metadata,
)
aandt_api_metadata_set_body.additional_properties = d
return aandt_api_metadata_set_body
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="AandtApiMetadataSetResponse401")
@_attrs_define
class AandtApiMetadataSetResponse401:
"""
Attributes:
message (str | Unset): Example: No Authorization header.
"""
message: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["message"] = message
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
message = d.pop("message", UNSET)
aandt_api_metadata_set_response_401 = cls(
message=message,
)
aandt_api_metadata_set_response_401.additional_properties = d
return aandt_api_metadata_set_response_401
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,253 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..models.match_multiround_modes import MatchMultiroundModes
from ..models.match_status import MatchStatus
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.match_players import MatchPlayers
from ..models.match_round import MatchRound
T = TypeVar("T", bound="Match")
@_attrs_define
class Match:
"""
Attributes:
id (int | Unset):
title (str | Unset):
internal_id (str | Unset):
status (MatchStatus | Unset):
status_display (str | Unset):
rounds_count (int | Unset):
use_points (bool | Unset):
points_are_positions (bool | Unset):
multiround_modes (MatchMultiroundModes | Unset):
multiround_modes_display (None | str | Unset):
creation_date (str | Unset): Example: 2026-08-01 10:00:00+00:00.
playing_date (str | Unset):
done_date (str | Unset):
current_round (int | Unset):
players (MatchPlayers | Unset): map of AAndTHasUserOrTeam pk (string key) -> MatschHasPlayerOrTeam pk
rounds (list[MatchRound] | Unset):
"""
id: int | Unset = UNSET
title: str | Unset = UNSET
internal_id: str | Unset = UNSET
status: MatchStatus | Unset = UNSET
status_display: str | Unset = UNSET
rounds_count: int | Unset = UNSET
use_points: bool | Unset = UNSET
points_are_positions: bool | Unset = UNSET
multiround_modes: MatchMultiroundModes | Unset = UNSET
multiround_modes_display: None | str | Unset = UNSET
creation_date: str | Unset = UNSET
playing_date: str | Unset = UNSET
done_date: str | Unset = UNSET
current_round: int | Unset = UNSET
players: MatchPlayers | Unset = UNSET
rounds: list[MatchRound] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
id = self.id
title = self.title
internal_id = self.internal_id
status: str | Unset = UNSET
if not isinstance(self.status, Unset):
status = self.status.value
status_display = self.status_display
rounds_count = self.rounds_count
use_points = self.use_points
points_are_positions = self.points_are_positions
multiround_modes: str | Unset = UNSET
if not isinstance(self.multiround_modes, Unset):
multiround_modes = self.multiround_modes.value
multiround_modes_display: None | str | Unset
if isinstance(self.multiround_modes_display, Unset):
multiround_modes_display = UNSET
else:
multiround_modes_display = self.multiround_modes_display
creation_date = self.creation_date
playing_date = self.playing_date
done_date = self.done_date
current_round = self.current_round
players: dict[str, Any] | Unset = UNSET
if not isinstance(self.players, Unset):
players = self.players.to_dict()
rounds: list[dict[str, Any]] | Unset = UNSET
if not isinstance(self.rounds, Unset):
rounds = []
for rounds_item_data in self.rounds:
rounds_item = rounds_item_data.to_dict()
rounds.append(rounds_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if id is not UNSET:
field_dict["id"] = id
if title is not UNSET:
field_dict["title"] = title
if internal_id is not UNSET:
field_dict["internal_id"] = internal_id
if status is not UNSET:
field_dict["status"] = status
if status_display is not UNSET:
field_dict["status_display"] = status_display
if rounds_count is not UNSET:
field_dict["rounds_count"] = rounds_count
if use_points is not UNSET:
field_dict["use_points"] = use_points
if points_are_positions is not UNSET:
field_dict["points_are_positions"] = points_are_positions
if multiround_modes is not UNSET:
field_dict["multiround_modes"] = multiround_modes
if multiround_modes_display is not UNSET:
field_dict["multiround_modes_display"] = multiround_modes_display
if creation_date is not UNSET:
field_dict["creation_date"] = creation_date
if playing_date is not UNSET:
field_dict["playing_date"] = playing_date
if done_date is not UNSET:
field_dict["done_date"] = done_date
if current_round is not UNSET:
field_dict["current_round"] = current_round
if players is not UNSET:
field_dict["players"] = players
if rounds is not UNSET:
field_dict["rounds"] = rounds
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.match_players import MatchPlayers
from ..models.match_round import MatchRound
d = dict(src_dict)
id = d.pop("id", UNSET)
title = d.pop("title", UNSET)
internal_id = d.pop("internal_id", UNSET)
_status = d.pop("status", UNSET)
status: MatchStatus | Unset
if isinstance(_status, Unset):
status = UNSET
else:
status = MatchStatus(_status)
status_display = d.pop("status_display", UNSET)
rounds_count = d.pop("rounds_count", UNSET)
use_points = d.pop("use_points", UNSET)
points_are_positions = d.pop("points_are_positions", UNSET)
_multiround_modes = d.pop("multiround_modes", UNSET)
multiround_modes: MatchMultiroundModes | Unset
if isinstance(_multiround_modes, Unset):
multiround_modes = UNSET
else:
multiround_modes = MatchMultiroundModes(_multiround_modes)
def _parse_multiround_modes_display(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
multiround_modes_display = _parse_multiround_modes_display(
d.pop("multiround_modes_display", UNSET)
)
creation_date = d.pop("creation_date", UNSET)
playing_date = d.pop("playing_date", UNSET)
done_date = d.pop("done_date", UNSET)
current_round = d.pop("current_round", UNSET)
_players = d.pop("players", UNSET)
players: MatchPlayers | Unset
if isinstance(_players, Unset):
players = UNSET
else:
players = MatchPlayers.from_dict(_players)
_rounds = d.pop("rounds", UNSET)
rounds: list[MatchRound] | Unset = UNSET
if _rounds is not UNSET:
rounds = []
for rounds_item_data in _rounds:
rounds_item = MatchRound.from_dict(rounds_item_data)
rounds.append(rounds_item)
match = cls(
id=id,
title=title,
internal_id=internal_id,
status=status,
status_display=status_display,
rounds_count=rounds_count,
use_points=use_points,
points_are_positions=points_are_positions,
multiround_modes=multiround_modes,
multiround_modes_display=multiround_modes_display,
creation_date=creation_date,
playing_date=playing_date,
done_date=done_date,
current_round=current_round,
players=players,
rounds=rounds,
)
match.additional_properties = d
return match
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,10 @@
from enum import StrEnum
class MatchMultiroundModes(StrEnum):
AP = "AP"
PA = "PA"
PS = "PS"
def __str__(self) -> str:
return str(self.value)
@@ -0,0 +1,48 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
T = TypeVar("T", bound="MatchPlayers")
@_attrs_define
class MatchPlayers:
"""map of AAndTHasUserOrTeam pk (string key) -> MatschHasPlayerOrTeam pk"""
additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
match_players = cls()
match_players.additional_properties = d
return match_players
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> int:
return self.additional_properties[key]
def __setitem__(self, key: str, value: int) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,89 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.match_round_result import MatchRoundResult
T = TypeVar("T", bound="MatchRound")
@_attrs_define
class MatchRound:
"""
Attributes:
round_id (int | Unset):
results (list[MatchRoundResult] | Unset):
"""
round_id: int | Unset = UNSET
results: list[MatchRoundResult] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
round_id = self.round_id
results: list[dict[str, Any]] | Unset = UNSET
if not isinstance(self.results, Unset):
results = []
for results_item_data in self.results:
results_item = results_item_data.to_dict()
results.append(results_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if round_id is not UNSET:
field_dict["round_id"] = round_id
if results is not UNSET:
field_dict["results"] = results
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.match_round_result import MatchRoundResult
d = dict(src_dict)
round_id = d.pop("round_id", UNSET)
_results = d.pop("results", UNSET)
results: list[MatchRoundResult] | Unset = UNSET
if _results is not UNSET:
results = []
for results_item_data in _results:
results_item = MatchRoundResult.from_dict(results_item_data)
results.append(results_item)
match_round = cls(
round_id=round_id,
results=results,
)
match_round.additional_properties = d
return match_round
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,71 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="MatchRoundResult")
@_attrs_define
class MatchRoundResult:
"""
Attributes:
score (float | Unset):
player_id (int | Unset): AAndTHasUserOrTeam pk
"""
score: float | Unset = UNSET
player_id: int | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
score = self.score
player_id = self.player_id
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if score is not UNSET:
field_dict["score"] = score
if player_id is not UNSET:
field_dict["player_id"] = player_id
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
score = d.pop("score", UNSET)
player_id = d.pop("player_id", UNSET)
match_round_result = cls(
score=score,
player_id=player_id,
)
match_round_result.additional_properties = d
return match_round_result
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,11 @@
from enum import StrEnum
class MatchStatus(StrEnum):
DONE = "done"
NEEDCONFIRM = "needConfirm"
PLAYING = "playing"
WAITPLAYER = "waitPlayer"
def __str__(self) -> str:
return str(self.value)
@@ -0,0 +1,120 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.member_team import MemberTeam
from ..models.member_user import MemberUser
T = TypeVar("T", bound="Member")
@_attrs_define
class Member:
"""
Attributes:
id (int | Unset): AAndTHasUserOrTeam pk
score (float | Unset):
done_all_matches (bool | Unset):
user (MemberUser | Unset):
team (MemberTeam | Unset):
"""
id: int | Unset = UNSET
score: float | Unset = UNSET
done_all_matches: bool | Unset = UNSET
user: MemberUser | Unset = UNSET
team: MemberTeam | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
id = self.id
score = self.score
done_all_matches = self.done_all_matches
user: dict[str, Any] | Unset = UNSET
if not isinstance(self.user, Unset):
user = self.user.to_dict()
team: dict[str, Any] | Unset = UNSET
if not isinstance(self.team, Unset):
team = self.team.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if id is not UNSET:
field_dict["id"] = id
if score is not UNSET:
field_dict["score"] = score
if done_all_matches is not UNSET:
field_dict["done_all_matches"] = done_all_matches
if user is not UNSET:
field_dict["user"] = user
if team is not UNSET:
field_dict["team"] = team
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.member_team import MemberTeam
from ..models.member_user import MemberUser
d = dict(src_dict)
id = d.pop("id", UNSET)
score = d.pop("score", UNSET)
done_all_matches = d.pop("done_all_matches", UNSET)
_user = d.pop("user", UNSET)
user: MemberUser | Unset
if isinstance(_user, Unset):
user = UNSET
else:
user = MemberUser.from_dict(_user)
_team = d.pop("team", UNSET)
team: MemberTeam | Unset
if isinstance(_team, Unset):
team = UNSET
else:
team = MemberTeam.from_dict(_team)
member = cls(
id=id,
score=score,
done_all_matches=done_all_matches,
user=user,
team=team,
)
member.additional_properties = d
return member
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,109 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.member_user import MemberUser
T = TypeVar("T", bound="MemberTeam")
@_attrs_define
class MemberTeam:
"""
Attributes:
name (str | Unset):
leader (int | None | Unset): pk of the leader's user, null if no leader
members (list[MemberUser] | Unset):
"""
name: str | Unset = UNSET
leader: int | None | Unset = UNSET
members: list[MemberUser] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
name = self.name
leader: int | None | Unset
if isinstance(self.leader, Unset):
leader = UNSET
else:
leader = self.leader
members: list[dict[str, Any]] | Unset = UNSET
if not isinstance(self.members, Unset):
members = []
for members_item_data in self.members:
members_item = members_item_data.to_dict()
members.append(members_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if name is not UNSET:
field_dict["name"] = name
if leader is not UNSET:
field_dict["leader"] = leader
if members is not UNSET:
field_dict["members"] = members
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.member_user import MemberUser
d = dict(src_dict)
name = d.pop("name", UNSET)
def _parse_leader(data: object) -> int | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(int | None | Unset, data)
leader = _parse_leader(d.pop("leader", UNSET))
_members = d.pop("members", UNSET)
members: list[MemberUser] | Unset = UNSET
if _members is not UNSET:
members = []
for members_item_data in _members:
members_item = MemberUser.from_dict(members_item_data)
members.append(members_item)
member_team = cls(
name=name,
leader=leader,
members=members,
)
member_team.additional_properties = d
return member_team
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,91 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="MemberUser")
@_attrs_define
class MemberUser:
"""
Attributes:
id (int | Unset):
username (str | Unset):
tournois_alias (None | str | Unset):
"""
id: int | Unset = UNSET
username: str | Unset = UNSET
tournois_alias: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
id = self.id
username = self.username
tournois_alias: None | str | Unset
if isinstance(self.tournois_alias, Unset):
tournois_alias = UNSET
else:
tournois_alias = self.tournois_alias
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if id is not UNSET:
field_dict["id"] = id
if username is not UNSET:
field_dict["username"] = username
if tournois_alias is not UNSET:
field_dict["tournois_alias"] = tournois_alias
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
id = d.pop("id", UNSET)
username = d.pop("username", UNSET)
def _parse_tournois_alias(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)
tournois_alias = _parse_tournois_alias(d.pop("tournois_alias", UNSET))
member_user = cls(
id=id,
username=username,
tournois_alias=tournois_alias,
)
member_user.additional_properties = d
return member_user
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,48 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
T = TypeVar("T", bound="Metadata")
@_attrs_define
class Metadata:
"""Arbitrary JSON metadata stored by the bot"""
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
metadata = cls()
metadata.additional_properties = d
return metadata
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
@@ -0,0 +1,62 @@
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self
from ..types import UNSET, Unset
T = TypeVar("T", bound="SuccessResponse")
@_attrs_define
class SuccessResponse:
"""
Attributes:
success (bool | Unset):
"""
success: bool | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
success = self.success
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if success is not UNSET:
field_dict["success"] = success
return field_dict
@classmethod
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
success = d.pop("success", UNSET)
success_response = cls(
success=success,
)
success_response.additional_properties = d
return success_response
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties