# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from ..._models import BaseModel

__all__ = ["V3GetLeaderboardResponse", "AllTime", "AllTimeAvatar", "Weekly", "WeeklyAvatar"]


class AllTimeAvatar(BaseModel):
    type: Literal["full_size", "thumbnail"]

    url: str


class AllTime(BaseModel):
    id: str

    avatar: Optional[List[AllTimeAvatar]] = None

    google_scholar_id: Optional[str] = FieldInfo(alias="googleScholarId", default=None)

    institution: Optional[str] = None

    real_name: str = FieldInfo(alias="realName")

    reputation: float

    username: str

    weekly_reputation: float = FieldInfo(alias="weeklyReputation")


class WeeklyAvatar(BaseModel):
    type: Literal["full_size", "thumbnail"]

    url: str


class Weekly(BaseModel):
    id: str

    avatar: Optional[List[WeeklyAvatar]] = None

    google_scholar_id: Optional[str] = FieldInfo(alias="googleScholarId", default=None)

    institution: Optional[str] = None

    real_name: str = FieldInfo(alias="realName")

    reputation: float

    username: str

    weekly_reputation: float = FieldInfo(alias="weeklyReputation")


class V3GetLeaderboardResponse(BaseModel):
    all_time: List[AllTime] = FieldInfo(alias="allTime")

    weekly: List[Weekly]
