# Generated by ariadne-codegen
# Source: queries/series-state

from typing import Any, List, Literal, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import GameType, ParticipationStatus


class SeriesDraftState(BaseModel):
    series_state: Optional["SeriesDraftStateSeriesState"] = Field(alias="seriesState")


class SeriesDraftStateSeriesState(BaseModel):
    id: str
    format: str
    started: bool
    finished: bool
    valid: bool
    games: List["SeriesDraftStateSeriesStateGames"]


class SeriesDraftStateSeriesStateGames(BaseModel):
    id: str
    started: bool
    teams: List["SeriesDraftStateSeriesStateGamesTeams"]
    draft_actions: List["SeriesDraftStateSeriesStateGamesDraftActions"] = Field(
        alias="draftActions"
    )
    finished: bool
    paused: bool
    started_at: Optional[Any] = Field(alias="startedAt")
    sequence_number: int = Field(alias="sequenceNumber")
    title_version: Optional["SeriesDraftStateSeriesStateGamesTitleVersion"] = Field(
        alias="titleVersion"
    )
    type: Optional[GameType]


class SeriesDraftStateSeriesStateGamesTeams(BaseModel):
    typename__: Literal[
        "GameTeamState",
        "GameTeamStateCs2",
        "GameTeamStateCsgo",
        "GameTeamStateDefault",
        "GameTeamStateDota",
        "GameTeamStateLol",
        "GameTeamStatePubg",
        "GameTeamStateR6",
        "GameTeamStateValorant",
    ] = Field(alias="__typename")
    id: str
    name: str
    side: str
    won: bool
    players: List["SeriesDraftStateSeriesStateGamesTeamsPlayers"]


class SeriesDraftStateSeriesStateGamesTeamsPlayers(BaseModel):
    typename__: Literal[
        "GamePlayerState",
        "GamePlayerStateCs2",
        "GamePlayerStateCsgo",
        "GamePlayerStateDefault",
        "GamePlayerStateDota",
        "GamePlayerStateLol",
        "GamePlayerStateMlbb",
        "GamePlayerStatePubg",
        "GamePlayerStateR6",
        "GamePlayerStateValorant",
    ] = Field(alias="__typename")
    id: str
    name: str
    character: Optional["SeriesDraftStateSeriesStateGamesTeamsPlayersCharacter"]
    roles: List["SeriesDraftStateSeriesStateGamesTeamsPlayersRoles"]
    participation_status: ParticipationStatus = Field(alias="participationStatus")


class SeriesDraftStateSeriesStateGamesTeamsPlayersCharacter(BaseModel):
    id: str
    name: str


class SeriesDraftStateSeriesStateGamesTeamsPlayersRoles(BaseModel):
    id: str


class SeriesDraftStateSeriesStateGamesDraftActions(BaseModel):
    id: str
    type: str
    sequence_number: str = Field(alias="sequenceNumber")
    drafter: "SeriesDraftStateSeriesStateGamesDraftActionsDrafter"
    draftable: "SeriesDraftStateSeriesStateGamesDraftActionsDraftable"


class SeriesDraftStateSeriesStateGamesDraftActionsDrafter(BaseModel):
    id: str
    type: str


class SeriesDraftStateSeriesStateGamesDraftActionsDraftable(BaseModel):
    id: str
    type: str
    name: str


class SeriesDraftStateSeriesStateGamesTitleVersion(BaseModel):
    name: str


SeriesDraftState.model_rebuild()
SeriesDraftStateSeriesState.model_rebuild()
SeriesDraftStateSeriesStateGames.model_rebuild()
SeriesDraftStateSeriesStateGamesTeams.model_rebuild()
SeriesDraftStateSeriesStateGamesTeamsPlayers.model_rebuild()
SeriesDraftStateSeriesStateGamesDraftActions.model_rebuild()
