# 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 ParticipationStatus


class SeriesStateLegacy(BaseModel):
    series_state: Optional["SeriesStateLegacySeriesState"] = Field(alias="seriesState")


class SeriesStateLegacySeriesState(BaseModel):
    version: Any
    id: str
    format: str
    started: bool
    finished: bool
    valid: bool
    updated_at: Any = Field(alias="updatedAt")
    started_at: Optional[Any] = Field(alias="startedAt")
    teams: List["SeriesStateLegacySeriesStateTeams"]
    games: List["SeriesStateLegacySeriesStateGames"]
    title: "SeriesStateLegacySeriesStateTitle"


class SeriesStateLegacySeriesStateTeams(BaseModel):
    typename__: Literal[
        "SeriesTeamState",
        "SeriesTeamStateCs2",
        "SeriesTeamStateCsgo",
        "SeriesTeamStateDefault",
        "SeriesTeamStateDota",
        "SeriesTeamStatePubg",
        "SeriesTeamStateR6",
        "SeriesTeamStateValorant",
    ] = Field(alias="__typename")
    id: str
    name: str
    score: int
    won: bool


class SeriesStateLegacySeriesStateGames(BaseModel):
    id: str
    sequence_number: int = Field(alias="sequenceNumber")
    started: bool
    finished: bool
    paused: bool
    teams: List["SeriesStateLegacySeriesStateGamesTeams"]
    external_links: List["SeriesStateLegacySeriesStateGamesExternalLinks"] = Field(
        alias="externalLinks"
    )
    map: "SeriesStateLegacySeriesStateGamesMap"
    clock: Optional["SeriesStateLegacySeriesStateGamesClock"]
    non_player_characters: List[
        "SeriesStateLegacySeriesStateGamesNonPlayerCharacters"
    ] = Field(alias="nonPlayerCharacters")
    structures: List["SeriesStateLegacySeriesStateGamesStructures"]


class SeriesStateLegacySeriesStateGamesTeams(BaseModel):
    typename__: Literal[
        "GameTeamState",
        "GameTeamStateCs2",
        "GameTeamStateCsgo",
        "GameTeamStateDefault",
        "GameTeamStateDota",
        "GameTeamStateLol",
        "GameTeamStatePubg",
        "GameTeamStateR6",
        "GameTeamStateValorant",
    ] = Field(alias="__typename")
    id: str
    name: str
    side: str
    won: bool
    score: int
    money: int
    loadout_value: int = Field(alias="loadoutValue")
    net_worth: int = Field(alias="netWorth")
    kills: int
    kill_assists_received: int = Field(alias="killAssistsReceived")
    kill_assists_given: int = Field(alias="killAssistsGiven")
    teamkills: int
    teamkill_assists_received: int = Field(alias="teamkillAssistsReceived")
    teamkill_assists_given: int = Field(alias="teamkillAssistsGiven")
    selfkills: int
    deaths: int
    structures_destroyed: int = Field(alias="structuresDestroyed")
    structures_captured: int = Field(alias="structuresCaptured")
    kill_assists_received_from_player: List[
        "SeriesStateLegacySeriesStateGamesTeamsKillAssistsReceivedFromPlayer"
    ] = Field(alias="killAssistsReceivedFromPlayer")
    objectives: List["SeriesStateLegacySeriesStateGamesTeamsObjectives"]
    unit_kills: List["SeriesStateLegacySeriesStateGamesTeamsUnitKills"] = Field(
        alias="unitKills"
    )
    players: List["SeriesStateLegacySeriesStateGamesTeamsPlayers"]
    multikills: List["SeriesStateLegacySeriesStateGamesTeamsMultikills"]


class SeriesStateLegacySeriesStateGamesTeamsKillAssistsReceivedFromPlayer(BaseModel):
    id: str
    player_id: str = Field(alias="playerId")
    kill_assists_received: int = Field(alias="killAssistsReceived")


class SeriesStateLegacySeriesStateGamesTeamsObjectives(BaseModel):
    id: str
    type: str
    completion_count: int = Field(alias="completionCount")


class SeriesStateLegacySeriesStateGamesTeamsUnitKills(BaseModel):
    id: str
    unit_name: str = Field(alias="unitName")
    count: int


class SeriesStateLegacySeriesStateGamesTeamsPlayers(BaseModel):
    typename__: Literal[
        "GamePlayerState",
        "GamePlayerStateCs2",
        "GamePlayerStateCsgo",
        "GamePlayerStateDefault",
        "GamePlayerStateDota",
        "GamePlayerStateLol",
        "GamePlayerStateMlbb",
        "GamePlayerStatePubg",
        "GamePlayerStateR6",
        "GamePlayerStateValorant",
    ] = Field(alias="__typename")
    id: str
    name: str
    participation_status: ParticipationStatus = Field(alias="participationStatus")
    money: int
    loadout_value: int = Field(alias="loadoutValue")
    net_worth: int = Field(alias="netWorth")
    kills: int
    kill_assists_received: int = Field(alias="killAssistsReceived")
    kill_assists_given: int = Field(alias="killAssistsGiven")
    deaths: int
    structures_destroyed: int = Field(alias="structuresDestroyed")


class SeriesStateLegacySeriesStateGamesTeamsMultikills(BaseModel):
    id: str
    number_of_kills: int = Field(alias="numberOfKills")
    count: int


class SeriesStateLegacySeriesStateGamesExternalLinks(BaseModel):
    data_provider: "SeriesStateLegacySeriesStateGamesExternalLinksDataProvider" = Field(
        alias="dataProvider"
    )
    external_entity: "SeriesStateLegacySeriesStateGamesExternalLinksExternalEntity" = (
        Field(alias="externalEntity")
    )


class SeriesStateLegacySeriesStateGamesExternalLinksDataProvider(BaseModel):
    name: str


class SeriesStateLegacySeriesStateGamesExternalLinksExternalEntity(BaseModel):
    id: str


class SeriesStateLegacySeriesStateGamesMap(BaseModel):
    name: str
    bounds: Optional["SeriesStateLegacySeriesStateGamesMapBounds"]


class SeriesStateLegacySeriesStateGamesMapBounds(BaseModel):
    min: "SeriesStateLegacySeriesStateGamesMapBoundsMin"
    max: "SeriesStateLegacySeriesStateGamesMapBoundsMax"


class SeriesStateLegacySeriesStateGamesMapBoundsMin(BaseModel):
    x: float
    y: float


class SeriesStateLegacySeriesStateGamesMapBoundsMax(BaseModel):
    x: float
    y: float


class SeriesStateLegacySeriesStateGamesClock(BaseModel):
    id: Optional[str]
    type: Optional[str]
    ticking: Optional[bool]
    ticks_backwards: Optional[bool] = Field(alias="ticksBackwards")
    current_seconds: Optional[int] = Field(alias="currentSeconds")


class SeriesStateLegacySeriesStateGamesNonPlayerCharacters(BaseModel):
    id: str
    type: str
    side: str
    alive: bool


class SeriesStateLegacySeriesStateGamesStructures(BaseModel):
    id: str
    type: str
    side: str
    team_id: str = Field(alias="teamId")
    current_health: int = Field(alias="currentHealth")
    max_health: int = Field(alias="maxHealth")
    destroyed: bool


class SeriesStateLegacySeriesStateTitle(BaseModel):
    name_shortened: str = Field(alias="nameShortened")


SeriesStateLegacy.model_rebuild()
SeriesStateLegacySeriesState.model_rebuild()
SeriesStateLegacySeriesStateGames.model_rebuild()
SeriesStateLegacySeriesStateGamesTeams.model_rebuild()
SeriesStateLegacySeriesStateGamesExternalLinks.model_rebuild()
SeriesStateLegacySeriesStateGamesMap.model_rebuild()
SeriesStateLegacySeriesStateGamesMapBounds.model_rebuild()
