# Generated by ariadne-codegen on 2023-06-06 10:49
# Source: graphql/queries.graphql

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel


class GetEventPhaseByDiscipline(BaseModel):
    get_event_phase_by_discipline: Optional[
        "GetEventPhaseByDisciplineGetEventPhaseByDiscipline"
    ] = Field(alias="getEventPhaseByDiscipline")


class GetEventPhaseByDisciplineGetEventPhaseByDiscipline(BaseModel):
    id: Optional[int]
    updated_on: Optional[Any] = Field(alias="updatedOn")
    hash: Optional[str]
    phase_code: Optional[str] = Field(alias="phaseCode")
    phase_name: Optional[str] = Field(alias="phaseName")
    event_i_d: Optional[int] = Field(alias="eventID")
    phase_date_and_time: Optional[Any] = Field(alias="phaseDateAndTime")
    sex_code: Optional[str] = Field(alias="sexCode")
    sex_name: Optional[str] = Field(alias="sexName")
    discipline: Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineDiscipline"]
    is_startlist_published: Optional[bool] = Field(alias="isStartlistPublished")
    is_result_published: Optional[bool] = Field(alias="isResultPublished")
    is_phase_summary_published: Optional[bool] = Field(alias="isPhaseSummaryPublished")
    is_team_standing_published: Optional[bool] = Field(alias="isTeamStandingPublished")
    combined_discipline_order: Optional[int] = Field(alias="combinedDisciplineOrder")
    phase_order: Optional[int] = Field(alias="phaseOrder")
    phase_session_name: Optional[str] = Field(alias="phaseSessionName")
    phase_session_order: Optional[int] = Field(alias="phaseSessionOrder")
    status: Optional[int]
    has_time: Optional[bool] = Field(alias="hasTime")
    event_id__w_a: Optional[int] = Field(alias="eventId_WA")
    primary_phase_order: Optional[int] = Field(alias="primaryPhaseOrder")
    is_points_published: Optional[bool] = Field(alias="isPointsPublished")
    phase_name_url_slug: Optional[str] = Field(alias="phaseNameUrlSlug")
    sex_name_url_slug: Optional[str] = Field(alias="sexNameUrlSlug")
    is_track: Optional[bool] = Field(alias="isTrack")
    units: Optional[
        List[Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnits"]]
    ]
    summary: Optional[
        List[Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummary"]]
    ]
    documents: Optional[
        List[Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineDocuments"]]
    ]


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineDiscipline(BaseModel):
    updated_on: Optional[Any] = Field(alias="updatedOn")
    hash: Optional[str]
    id: Optional[str] = Field(alias="_id")
    name: Optional[str]
    type_code: Optional[str] = Field(alias="typeCode")
    type_name: Optional[str] = Field(alias="typeName")
    type_order: Optional[int] = Field(alias="typeOrder")
    order: Optional[int]
    is_track: Optional[bool] = Field(alias="isTrack")
    is_field: Optional[bool] = Field(alias="isField")
    is_road: Optional[bool] = Field(alias="isRoad")
    is_combined: Optional[bool] = Field(alias="isCombined")
    is_walk: Optional[bool] = Field(alias="isWalk")
    is_indoor: Optional[bool] = Field(alias="isIndoor")
    is_reaction: Optional[bool] = Field(alias="isReaction")
    is_outdoor: Optional[bool] = Field(alias="isOutdoor")
    is_wind: Optional[bool] = Field(alias="isWind")
    is_relay: Optional[bool] = Field(alias="isRelay")
    is_valid_i_a_a_f: Optional[bool] = Field(alias="isValidIAAF")
    name_url_slug: Optional[str] = Field(alias="nameUrlSlug")
    type_name_url_slug: Optional[str] = Field(alias="typeNameUrlSlug")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnits(BaseModel):
    unit_id: Optional[int] = Field(alias="unitId")
    unit_date_time: Optional[Any] = Field(alias="unitDateTime")
    has_standing_points: Optional[bool] = Field(alias="hasStandingPoints")
    unit_rule_detail: Optional[str] = Field(alias="unitRuleDetail")
    unit_type_code: Optional[str] = Field(alias="unitTypeCode")
    unit_type_name: Optional[str] = Field(alias="unitTypeName")
    unit_code: Optional[str] = Field(alias="unitCode")
    unit_order: Optional[int] = Field(alias="unitOrder")
    results: Optional[
        List[Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResults"]]
    ]
    startlist: Optional[
        List[
            Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlist"]
        ]
    ]
    series: Optional[
        List[Optional["GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeries"]]
    ]
    splits: Optional[
        List[
            Optional[
                List[
                    Optional[
                        "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSplits"
                    ]
                ]
            ]
        ]
    ]
    team_standings: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandings"
            ]
        ]
    ] = Field(alias="teamStandings")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResults(BaseModel):
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    competitor_type_code: Optional[str] = Field(alias="competitorTypeCode")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    competitor_country_name: Optional[str] = Field(alias="competitorCountryName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    standing_points: Optional[str] = Field(alias="standingPoints")
    combined_points: Optional[str] = Field(alias="combinedPoints")
    competitor_id: Optional[int] = Field(alias="competitorId")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_wind: Optional[str] = Field(alias="resultWind")
    result_rank: Optional[int] = Field(alias="resultRank")
    result_order: Optional[int] = Field(alias="resultOrder")
    reaction_time: Optional[str] = Field(alias="reactionTime")
    record: Optional[str]
    bib: Optional[str]
    qualified: Optional[str]
    team_members: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResultsTeamMembers"
            ]
        ]
    ] = Field(alias="teamMembers")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResultsTeamMembers(
    BaseModel
):
    competitor_id: Optional[int] = Field(alias="competitorId")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_rank: Optional[str] = Field(alias="resultRank")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    country_name: Optional[str] = Field(alias="countryName")
    competitor_order: Optional[int] = Field(alias="competitorOrder")
    standing_detail_scoring: Optional[bool] = Field(alias="standingDetailScoring")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlist(BaseModel):
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    competitor_type_code: Optional[str] = Field(alias="competitorTypeCode")
    competitor_country_name: Optional[str] = Field(alias="competitorCountryName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    competitor_id: Optional[int] = Field(alias="competitorId")
    personal_best_mark: Optional[str] = Field(alias="personalBestMark")
    season_best_mark: Optional[str] = Field(alias="seasonBestMark")
    world_ranking: Optional[str] = Field(alias="worldRanking")
    bib: Optional[str]
    startlist_order: Optional[int] = Field(alias="startlistOrder")
    record: Optional[str]
    start: Optional[int]
    team_members: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlistTeamMembers"
            ]
        ]
    ] = Field(alias="teamMembers")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlistTeamMembers(
    BaseModel
):
    competitor_id: Optional[int] = Field(alias="competitorId")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_rank: Optional[str] = Field(alias="resultRank")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    country_name: Optional[str] = Field(alias="countryName")
    competitor_order: Optional[int] = Field(alias="competitorOrder")
    standing_detail_scoring: Optional[bool] = Field(alias="standingDetailScoring")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeries(BaseModel):
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    competitor_type_code: Optional[str] = Field(alias="competitorTypeCode")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    competitor_country_name: Optional[str] = Field(alias="competitorCountryName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    competitor_id: Optional[int] = Field(alias="competitorId")
    bib: Optional[str]
    startlist_order: Optional[int] = Field(alias="startlistOrder")
    qualified: Optional[str]
    result_wind: Optional[str] = Field(alias="resultWind")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_order: Optional[str] = Field(alias="resultOrder")
    record: Optional[str]
    attempts: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeriesAttempts"
            ]
        ]
    ]


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeriesAttempts(BaseModel):
    intermediate_mark: Optional[str] = Field(alias="intermediateMark")
    intermediate_wind: Optional[str] = Field(alias="intermediateWind")
    competition_intermediate_name: Optional[str] = Field(
        alias="competitionIntermediateName"
    )
    intermediate_gap: Optional[str] = Field(alias="intermediateGap")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSplits(BaseModel):
    competition_intermediate_result_order: Optional[int] = Field(
        alias="competitionIntermediateResultOrder"
    )
    competition_intermediate_name: Optional[str] = Field(
        alias="competitionIntermediateName"
    )
    intermediate_mark: Optional[str] = Field(alias="intermediateMark")
    intermediate_gap: Optional[str] = Field(alias="intermediateGap")
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    competitor_country_name: Optional[str] = Field(alias="competitorCountryName")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandings(BaseModel):
    id: Optional[int] = Field(alias="_id")
    phase_id: Optional[int] = Field(alias="phaseId")
    unit_id: Optional[int] = Field(alias="unitId")
    rank: Optional[int]
    team_id: Optional[int] = Field(alias="teamId")
    team_name: Optional[str] = Field(alias="teamName")
    team_country_code: Optional[str] = Field(alias="teamCountryCode")
    standing_mark: Optional[str] = Field(alias="standingMark")
    competitor_id: Optional[str] = Field(alias="competitorId")
    team_standing_order: Optional[int] = Field(alias="teamStandingOrder")
    team_event_points: Optional[int] = Field(alias="teamEventPoints")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    team_members: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandingsTeamMembers"
            ]
        ]
    ] = Field(alias="teamMembers")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandingsTeamMembers(
    BaseModel
):
    competitor_id: Optional[int] = Field(alias="competitorId")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_rank: Optional[str] = Field(alias="resultRank")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    country_name: Optional[str] = Field(alias="countryName")
    competitor_order: Optional[int] = Field(alias="competitorOrder")
    standing_detail_scoring: Optional[bool] = Field(alias="standingDetailScoring")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummary(BaseModel):
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    competitor_type_code: Optional[str] = Field(alias="competitorTypeCode")
    competitor_country_name: Optional[str] = Field(alias="competitorCountryName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    phase_summary_order: Optional[str] = Field(alias="phaseSummaryOrder")
    combined_points: Optional[str] = Field(alias="combinedPoints")
    competitor_id: Optional[int] = Field(alias="competitorId")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_wind: Optional[str] = Field(alias="resultWind")
    result_rank: Optional[int] = Field(alias="resultRank")
    result_order: Optional[int] = Field(alias="resultOrder")
    unit_code: Optional[int] = Field(alias="unitCode")
    unit_name: Optional[str] = Field(alias="unitName")
    reaction_time: Optional[str] = Field(alias="reactionTime")
    record: Optional[str]
    bib: Optional[str]
    qualified: Optional[str]
    summary_rank: Optional[int] = Field(alias="summaryRank")
    team_members: Optional[
        List[
            Optional[
                "GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummaryTeamMembers"
            ]
        ]
    ] = Field(alias="teamMembers")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummaryTeamMembers(BaseModel):
    competitor_id: Optional[int] = Field(alias="competitorId")
    competitor_id__w_a: Optional[int] = Field(alias="competitorId_WA")
    competitor_name: Optional[str] = Field(alias="competitorName")
    competitor_first_name: Optional[str] = Field(alias="competitorFirstName")
    competitor_last_name: Optional[str] = Field(alias="competitorLastName")
    competitor_country_code: Optional[str] = Field(alias="competitorCountryCode")
    result_mark: Optional[str] = Field(alias="resultMark")
    result_rank: Optional[str] = Field(alias="resultRank")
    result_country_name: Optional[str] = Field(alias="resultCountryName")
    result_country_code: Optional[str] = Field(alias="resultCountryCode")
    country_name: Optional[str] = Field(alias="countryName")
    competitor_order: Optional[int] = Field(alias="competitorOrder")
    standing_detail_scoring: Optional[bool] = Field(alias="standingDetailScoring")


class GetEventPhaseByDisciplineGetEventPhaseByDisciplineDocuments(BaseModel):
    type: Optional[int]
    type_name: Optional[str] = Field(alias="typeName")
    file_name: Optional[str] = Field(alias="fileName")
    file_path: Optional[str] = Field(alias="filePath")
    unit_id: Optional[int] = Field(alias="unitId")


GetEventPhaseByDiscipline.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDiscipline.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineDiscipline.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnits.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResults.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsResultsTeamMembers.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlist.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsStartlistTeamMembers.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeries.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSeriesAttempts.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsSplits.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandings.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineUnitsTeamStandingsTeamMembers.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummary.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineSummaryTeamMembers.update_forward_refs()
GetEventPhaseByDisciplineGetEventPhaseByDisciplineDocuments.update_forward_refs()
