# generated by datamodel-codegen:
#   filename:  schema.json
#   timestamp: 2025-10-19T17:24:31+00:00

from __future__ import annotations

from enum import Enum
from typing import List, Optional

from pydantic import BaseModel, Field


class RatedTier(Enum):
    """@public"""

    orange = "ORANGE"
    purple = "PURPLE"
    blue = "BLUE"
    green = "GREEN"
    gray = "GRAY"


class MiniSeriesDTO(BaseModel):
    """@public"""

    losses: int
    progress: str
    target: int
    wins: int


class LeagueItemDTO(BaseModel):
    """@public"""

    fresh_blood: bool = Field(..., alias="freshBlood")
    wins: int = Field(..., description="First placement.")
    mini_series: Optional[MiniSeriesDTO] = Field(None, alias="miniSeries")
    inactive: bool
    veteran: bool
    hot_streak: bool = Field(..., alias="hotStreak")
    rank: str
    league_points: int = Field(..., alias="leaguePoints")
    losses: int = Field(..., description="Second through eighth placement.")
    puuid: str = Field(..., description="Player's encrypted puuid.")


class TopRatedLadderEntryDto(BaseModel):
    """@public"""

    puuid: str = Field(..., description="Player's encrypted puuid.")
    rated_tier: RatedTier = Field(
        ...,
        alias="ratedTier",
        description="(Legal values:  ORANGE,  PURPLE,  BLUE,  GREEN,  GRAY)",
    )
    rated_rating: int = Field(..., alias="ratedRating")
    wins: int = Field(..., description="First placement.")
    previous_update_ladder_position: int = Field(
        ..., alias="previousUpdateLadderPosition"
    )


class LeagueEntryDTO(BaseModel):
    """@public"""

    puuid: Optional[str] = Field(
        None,
        description="Player Universal Unique Identifier. Exact length of 78 characters. (Encrypted)",
    )
    league_id: Optional[str] = Field(
        None,
        alias="leagueId",
        description="Not included for the RANKED_TFT_TURBO queueType.",
    )
    queue_type: str = Field(..., alias="queueType")
    rated_tier: Optional[RatedTier] = Field(
        None,
        alias="ratedTier",
        description="Only included for the RANKED_TFT_TURBO queueType.\n             (Legal values:  ORANGE,  PURPLE,  BLUE,  GREEN,  GRAY)",
    )
    rated_rating: Optional[int] = Field(
        None,
        alias="ratedRating",
        description="Only included for the RANKED_TFT_TURBO queueType.",
    )
    tier: Optional[str] = Field(
        None, description="Not included for the RANKED_TFT_TURBO queueType."
    )
    rank: Optional[str] = Field(
        None,
        description="The player's division within a tier. Not included for the RANKED_TFT_TURBO queueType.",
    )
    league_points: Optional[int] = Field(
        None,
        alias="leaguePoints",
        description="Not included for the RANKED_TFT_TURBO queueType.",
    )
    wins: int = Field(..., description="First placement.")
    losses: int = Field(..., description="Second through eighth placement.")
    hot_streak: Optional[bool] = Field(
        None,
        alias="hotStreak",
        description="Not included for the RANKED_TFT_TURBO queueType.",
    )
    veteran: Optional[bool] = Field(
        None, description="Not included for the RANKED_TFT_TURBO queueType."
    )
    fresh_blood: Optional[bool] = Field(
        None,
        alias="freshBlood",
        description="Not included for the RANKED_TFT_TURBO queueType.",
    )
    inactive: Optional[bool] = Field(
        None, description="Not included for the RANKED_TFT_TURBO queueType."
    )
    mini_series: Optional[MiniSeriesDTO] = Field(
        None,
        alias="miniSeries",
        description="Not included for the RANKED_TFT_TURBO queueType.",
    )


class LeagueListDTO(BaseModel):
    """@public"""

    league_id: Optional[str] = Field(None, alias="leagueId")
    entries: List[LeagueItemDTO]
    tier: str
    name: Optional[str] = None
    queue: Optional[str] = None
