# Generated by ariadne-codegen
# Source: graphql/queries.graphql

from typing import List, Optional

from pydantic import Field

from .base_model import BaseModel


class GetCalendarCompetitionResults(BaseModel):
    get_calendar_competition_results: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResults"
    ] = Field(alias="getCalendarCompetitionResults")


class GetCalendarCompetitionResultsGetCalendarCompetitionResults(BaseModel):
    competition: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsCompetition"
    ]
    event_titles: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitles"
            ]
        ]
    ] = Field(alias="eventTitles")
    options: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptions"
    ]
    parameters: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsParameters"
    ]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsCompetition(BaseModel):
    date_range: Optional[str] = Field(alias="dateRange")
    end_date: Optional[str] = Field(alias="endDate")
    name: Optional[str]
    ranking_category: Optional[str] = Field(alias="rankingCategory")
    start_date: Optional[str] = Field(alias="startDate")
    venue: Optional[str]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitles(BaseModel):
    event_title: Optional[str] = Field(alias="eventTitle")
    events: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEvents"
            ]
        ]
    ]
    ranking_category: Optional[str] = Field(alias="rankingCategory")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEvents(
    BaseModel
):
    event: Optional[str]
    event_id: Optional[int] = Field(alias="eventId")
    gender: Optional[str]
    is_relay: Optional[bool] = Field(alias="isRelay")
    per_result_wind: Optional[bool] = Field(alias="perResultWind")
    races: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRaces"
            ]
        ]
    ]
    summary: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummary"
            ]
        ]
    ]
    with_wind: Optional[bool] = Field(alias="withWind")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRaces(
    BaseModel
):
    date: Optional[str]
    day: Optional[int]
    race: Optional[str]
    race_id: Optional[int] = Field(alias="raceId")
    race_number: Optional[int] = Field(alias="raceNumber")
    wind: Optional[str]
    results: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResults"
            ]
        ]
    ]
    start_list: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesStartList"
            ]
        ]
    ] = Field(alias="startList")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResults(
    BaseModel
):
    id: Optional[str]
    competitor: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResultsCompetitor"
    ]
    mark: Optional[str]
    nationality: Optional[str]
    place: Optional[str]
    points: Optional[int]
    qualified: Optional[bool]
    records: Optional[str]
    wind: Optional[str]
    remark: Optional[str]
    details: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResultsDetails"
            ]
        ]
    ]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResultsCompetitor(
    BaseModel
):
    name: Optional[str]
    url_slug: Optional[str] = Field(alias="urlSlug")
    id: Optional[str]
    iaaf_id: Optional[int] = Field(alias="iaafId")
    birth_date: Optional[str] = Field(alias="birthDate")
    has_profile: Optional[bool] = Field(alias="hasProfile")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResultsDetails(
    BaseModel
):
    event: Optional[str]
    event_id: Optional[int] = Field(alias="eventId")
    race_number: Optional[int] = Field(alias="raceNumber")
    mark: Optional[str]
    wind: Optional[str]
    place_in_round: Optional[int] = Field(alias="placeInRound")
    place_in_race: Optional[int] = Field(alias="placeInRace")
    points: Optional[int]
    overall_points: Optional[int] = Field(alias="overallPoints")
    place_in_round_by_points: Optional[int] = Field(alias="placeInRoundByPoints")
    overall_place_by_points: Optional[int] = Field(alias="overallPlaceByPoints")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesStartList(
    BaseModel
):
    competitor: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesStartListCompetitor"
    ]
    order: Optional[str]
    pb: Optional[str]
    sb: Optional[str]
    bib: Optional[str]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesStartListCompetitor(
    BaseModel
):
    birth_date: Optional[str] = Field(alias="birthDate")
    country: Optional[str]
    id: Optional[str]
    name: Optional[str]
    url_slug: Optional[str] = Field(alias="urlSlug")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummary(
    BaseModel
):
    competitor: Optional[
        "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummaryCompetitor"
    ]
    mark: Optional[str]
    nationality: Optional[str]
    place_in_race: Optional[str] = Field(alias="placeInRace")
    place_in_round: Optional[str] = Field(alias="placeInRound")
    points: Optional[int]
    race_number: Optional[int] = Field(alias="raceNumber")
    records: Optional[str]
    wind: Optional[str]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummaryCompetitor(
    BaseModel
):
    name: Optional[str]
    url_slug: Optional[str] = Field(alias="urlSlug")
    id: Optional[str]
    iaaf_id: Optional[int] = Field(alias="iaafId")
    birth_date: Optional[str] = Field(alias="birthDate")
    has_profile: Optional[bool] = Field(alias="hasProfile")
    team_members: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummaryCompetitorTeamMembers"
            ]
        ]
    ] = Field(alias="teamMembers")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummaryCompetitorTeamMembers(
    BaseModel
):
    name: Optional[str]
    url_slug: Optional[str] = Field(alias="urlSlug")
    id: Optional[int]
    iaaf_id: Optional[int] = Field(alias="iaafId")


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptions(BaseModel):
    days: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptionsDays"
            ]
        ]
    ]
    events: Optional[
        List[
            Optional[
                "GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptionsEvents"
            ]
        ]
    ]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptionsDays(BaseModel):
    date: Optional[str]
    day: Optional[int]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptionsEvents(
    BaseModel
):
    gender: Optional[str]
    id: Optional[int]
    name: Optional[str]
    combined: Optional[bool]


class GetCalendarCompetitionResultsGetCalendarCompetitionResultsParameters(BaseModel):
    competition_id: Optional[int] = Field(alias="competitionId")
    day: Optional[int]
    event_id: Optional[int] = Field(alias="eventId")


GetCalendarCompetitionResults.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResults.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitles.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEvents.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRaces.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesResults.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsRacesStartList.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummary.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsEventTitlesEventsSummaryCompetitor.model_rebuild()
GetCalendarCompetitionResultsGetCalendarCompetitionResultsOptions.model_rebuild()
