# Generated by ariadne-codegen
# Source: https://api.grid.gg/central-data/graphql

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ContentCatalogEntityType,
    ContentCatalogVersionOrderField,
    OrderDirection,
    PlayerType,
    SeriesType,
    ServiceLevel,
    TournamentVenueType,
)


class BooleanFilter(BaseModel):
    equals: Optional[bool] = None


class BoundsInput(BaseModel):
    max: "CoordinatesInput"
    min: "CoordinatesInput"


class ContentCatalogEntityFilter(BaseModel):
    entity_type: Optional["ContentCatalogEntityTypeFilter"] = Field(
        alias="entityType", default=None
    )
    id: Optional["IdFilter"] = None
    name: Optional["StringFilter"] = None
    private: Optional["BooleanFilter"] = None
    title: Optional["ContentCatalogEntityTitleFilter"] = None


class ContentCatalogEntityTitleFilter(BaseModel):
    id: Optional["IdFilter"] = None


class ContentCatalogEntityTypeFilter(BaseModel):
    in_: List[ContentCatalogEntityType] = Field(alias="in")


class ContentCatalogVersionFilter(BaseModel):
    name: Optional["StringFilter"] = None
    private: Optional["BooleanFilter"] = None
    published_on: Optional["DateTimeFilter"] = Field(alias="publishedOn", default=None)
    title: Optional["ContentCatalogVersionTitleFilter"] = None


class ContentCatalogVersionOrder(BaseModel):
    direction: OrderDirection
    field: ContentCatalogVersionOrderField


class ContentCatalogVersionTitleFilter(BaseModel):
    id: Optional["IdFilter"] = None


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


class CreateContentCatalogCharacterInput(BaseModel):
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: Optional[str] = None
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class CreateContentCatalogItemInput(BaseModel):
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    cost: Optional[float] = None
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: Optional[str] = None
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class CreateContentCatalogMapInput(BaseModel):
    bounds: Optional["BoundsInput"] = None
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: Optional[str] = None
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class CreateContentCatalogVersionInput(BaseModel):
    external_links: List["ExternalLinkInput"] = Field(alias="externalLinks")
    name: str
    private: Optional[bool] = None
    published_on: Any = Field(alias="publishedOn")
    title_id: str = Field(alias="titleId")


class CreatePlayerInput(BaseModel):
    external_links: List["ExternalLinkInput"] = Field(alias="externalLinks")
    image_data: Optional[str] = Field(alias="imageData", default=None)
    nickname: str
    private: Optional[bool] = None
    role: List["CreatePlayerPlayerRoleInput"]
    team: "CreatePlayerTeamInput"
    title: "CreatePlayerTitleInput"


class CreatePlayerPlayerRoleInput(BaseModel):
    id: str


class CreatePlayerRoleInput(BaseModel):
    name: str
    private: Optional[bool] = None
    title: "CreatePlayerRoleTitleInput"


class CreatePlayerRoleTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class CreatePlayerTeamInput(BaseModel):
    team_id: str = Field(alias="teamId")


class CreatePlayerTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class CreateSeriesFormatInput(BaseModel):
    id: str


class CreateSeriesInput(BaseModel):
    external_links: List["ExternalLinkInput"] = Field(alias="externalLinks")
    format: "CreateSeriesFormatInput"
    players: List["CreateSeriesParticipatingPlayersInput"]
    private: Optional[bool] = None
    start_time_scheduled: Any = Field(alias="startTimeScheduled")
    teams: List["CreateSeriesTeamInput"]
    title: "CreateSeriesTitleInput"
    tournament: "CreateSeriesTournamentInput"


class CreateSeriesParticipatingPlayersInput(BaseModel):
    id: str


class CreateSeriesTeamInput(BaseModel):
    score_advantage: int = Field(alias="scoreAdvantage")
    team_id: str = Field(alias="teamId")


class CreateSeriesTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class CreateSeriesTournamentInput(BaseModel):
    tournament_id: str = Field(alias="tournamentId")


class CreateTeamInput(BaseModel):
    color_primary: Any = Field(alias="colorPrimary")
    color_secondary: Any = Field(alias="colorSecondary")
    external_links: List["ExternalLinkInput"] = Field(alias="externalLinks")
    logo_data: Optional[str] = Field(alias="logoData", default=None)
    name: str
    name_shortened: Optional[str] = Field(alias="nameShortened", default=None)
    private: Optional[bool] = None
    title: "CreateTeamTitleInput"


class CreateTeamTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class CreateTournamentInput(BaseModel):
    end_date: Optional["DateInput"] = Field(alias="endDate", default=None)
    external_links: List["ExternalLinkInput"] = Field(alias="externalLinks")
    logo_data: Optional[str] = Field(alias="logoData", default=None)
    name: str
    name_shortened: str = Field(alias="nameShortened")
    parent: Optional["CreateTournamentParentInput"] = None
    private: Optional[bool] = None
    prize_pool: Optional["MoneyInput"] = Field(alias="prizePool", default=None)
    start_date: Optional["DateInput"] = Field(alias="startDate", default=None)
    teams: List["CreateTournamentTeamInput"]
    titles: List["CreateTournamentTitleInput"]
    venue_type: TournamentVenueType = Field(alias="venueType")


class CreateTournamentParentInput(BaseModel):
    tournament_id: str = Field(alias="tournamentId")


class CreateTournamentTeamInput(BaseModel):
    team_id: str = Field(alias="teamId")


class CreateTournamentTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class DateInput(BaseModel):
    date: Optional[Any] = None


class DateTimeFilter(BaseModel):
    gte: Optional[str] = None
    lte: Optional[str] = None


class DeletePlayerInput(BaseModel):
    id: str


class DeletePlayerRoleInput(BaseModel):
    id: str


class DeleteSeriesInput(BaseModel):
    id: str


class DeleteTeamInput(BaseModel):
    id: str


class DeleteTournamentInput(BaseModel):
    id: str


class ExternalEntityInput(BaseModel):
    id: str


class ExternalLinkInput(BaseModel):
    data_provider_name: str = Field(alias="dataProviderName")
    external_entity_input: "ExternalEntityInput" = Field(alias="externalEntityInput")


class GameFilter(BaseModel):
    id: Optional["IdFilter"] = None
    map: Optional["MapFilter"] = None


class IdFilter(BaseModel):
    in_: Optional[List[str]] = Field(alias="in", default=None)


class IntFilter(BaseModel):
    equals: Optional[int] = None
    gte: Optional[int] = None
    lte: Optional[int] = None


class MapFilter(BaseModel):
    name: Optional["StringFilter"] = None


class MoneyInput(BaseModel):
    amount: Optional[Any] = None


class NationalityFilter(BaseModel):
    code: Optional["StringFilter"] = None
    name: Optional["StringFilter"] = None


class NullableDateFilter(BaseModel):
    gte: Optional[Any] = None
    lte: Optional[Any] = None


class NullableIdFilter(BaseModel):
    id: Optional[str] = None


class OrganizationFilter(BaseModel):
    name: Optional["StringFilter"] = None
    private: Optional["BooleanFilter"] = None


class PlayerFilter(BaseModel):
    age: Optional["IntFilter"] = None
    full_name: Optional["StringFilter"] = Field(alias="fullName", default=None)
    nationality: Optional["NationalityFilter"] = None
    nickname: Optional["StringFilter"] = None
    private: Optional["BooleanFilter"] = None
    roles: Optional["PlayerPlayerRoleFilter"] = None
    team_id_filter: Optional["NullableIdFilter"] = Field(
        alias="teamIdFilter", default=None
    )
    title_id: Optional[str] = Field(alias="titleId", default=None)
    types: Optional[List[PlayerType]] = None


class PlayerPlayerRoleFilter(BaseModel):
    name: Optional["StringFilter"] = None
    title: Optional["PlayerRoleTitleFilter"] = None


class PlayerRoleFilter(BaseModel):
    name: Optional["StringFilter"] = None
    title: Optional["PlayerRoleTitleFilter"] = None


class PlayerRoleTitleFilter(BaseModel):
    id: "IdFilter"


class ProductServiceLevelFilter(BaseModel):
    product_name: str = Field(alias="productName")
    service_level: ServiceLevel = Field(alias="serviceLevel")


class SeriesFilter(BaseModel):
    live: Optional["SeriesLiveFilter"] = None
    live_player_ids: Optional["IdFilter"] = Field(alias="livePlayerIds", default=None)
    players: Optional["SeriesPlayerFilter"] = None
    private: Optional["BooleanFilter"] = None
    product_service_levels: Optional["ProductServiceLevelFilter"] = Field(
        alias="productServiceLevels", default=None
    )
    start_time_scheduled: Optional["DateTimeFilter"] = Field(
        alias="startTimeScheduled", default=None
    )
    team_id: Optional[str] = Field(alias="teamId", default=None)
    team_ids: Optional["IdFilter"] = Field(alias="teamIds", default=None)
    title_id: Optional[str] = Field(alias="titleId", default=None)
    title_ids: Optional["IdFilter"] = Field(alias="titleIds", default=None)
    tournament: Optional["SeriesTournamentFilter"] = None
    tournament_id: Optional[str] = Field(alias="tournamentId", default=None)
    tournament_ids: Optional["IdFilter"] = Field(alias="tournamentIds", default=None)
    type: Optional[SeriesType] = None
    types: Optional[List[SeriesType]] = None


class SeriesLiveFilter(BaseModel):
    games: Optional["GameFilter"] = None


class SeriesPlayerFilter(BaseModel):
    age: Optional["IntFilter"] = None


class SeriesTournamentFilter(BaseModel):
    end_date: Optional["NullableDateFilter"] = Field(alias="endDate", default=None)
    id: Optional["IdFilter"] = None
    include_children: Optional["BooleanFilter"] = Field(
        alias="includeChildren", default=None
    )
    name: Optional["StringFilter"] = None
    name_shortened: Optional["StringFilter"] = Field(
        alias="nameShortened", default=None
    )
    start_date: Optional["NullableDateFilter"] = Field(alias="startDate", default=None)
    title: Optional["SeriesTournamentTitleFilter"] = None


class SeriesTournamentTitleFilter(BaseModel):
    id: Optional["IdFilter"] = None


class StringFilter(BaseModel):
    contains: Optional[str] = None
    equals: Optional[str] = None


class TeamFilter(BaseModel):
    name: Optional["StringFilter"] = None
    name_shortened: Optional["StringFilter"] = Field(
        alias="nameShortened", default=None
    )
    organization_id: Optional[str] = Field(alias="organizationId", default=None)
    private: Optional["BooleanFilter"] = None
    title_id: Optional[str] = Field(alias="titleId", default=None)


class TitleFilter(BaseModel):
    private: Optional["BooleanFilter"] = None


class TournamentFilter(BaseModel):
    end_date: Optional["NullableDateFilter"] = Field(alias="endDate", default=None)
    has_children: Optional["BooleanFilter"] = Field(alias="hasChildren", default=None)
    has_parent: Optional["BooleanFilter"] = Field(alias="hasParent", default=None)
    name: Optional["StringFilter"] = None
    name_shortened: Optional["StringFilter"] = Field(
        alias="nameShortened", default=None
    )
    private: Optional["BooleanFilter"] = None
    start_date: Optional["NullableDateFilter"] = Field(alias="startDate", default=None)
    title: Optional["TournamentTitleFilter"] = None
    title_id: Optional[str] = Field(alias="titleId", default=None)
    venue_type: Optional[List[TournamentVenueType]] = Field(
        alias="venueType", default=None
    )


class TournamentTitleFilter(BaseModel):
    id: Optional["IdFilter"] = None


class UpdateContentCatalogCharacterInput(BaseModel):
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class UpdateContentCatalogItemInput(BaseModel):
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    cost: Optional[float] = None
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class UpdateContentCatalogMapInput(BaseModel):
    bounds: Optional["BoundsInput"] = None
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    image_data: Optional[str] = Field(alias="imageData", default=None)
    name: Optional[str] = None
    private: Optional[bool] = None


class UpdateContentCatalogVersionInput(BaseModel):
    content_catalog_version_id: str = Field(alias="contentCatalogVersionId")
    private: Optional[bool] = None


class UpdateContentCatalogVersionOwnerInput(BaseModel):
    owner_id: str = Field(alias="ownerId")


class UpdatePlayerInput(BaseModel):
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    image_data: Optional[str] = Field(alias="imageData", default=None)
    nickname: Optional[str] = None
    private: Optional[bool] = None
    role: Optional[List["UpdatePlayerPlayerRoleInput"]] = None
    team: Optional["UpdatePlayerTeamInput"] = None
    title: Optional["UpdatePlayerTitleInput"] = None


class UpdatePlayerPlayerRoleInput(BaseModel):
    id: str


class UpdatePlayerRoleInput(BaseModel):
    id: str
    name: Optional[str] = None
    private: Optional[bool] = None


class UpdatePlayerRoleTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class UpdatePlayerTeamInput(BaseModel):
    team_id: Optional[str] = Field(alias="teamId", default=None)


class UpdatePlayerTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class UpdateSeriesFormatInput(BaseModel):
    id: str


class UpdateSeriesInput(BaseModel):
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    format: Optional["UpdateSeriesFormatInput"] = None
    id: str
    players: Optional[List["UpdateSeriesParticipatingPlayersInput"]] = None
    private: Optional[bool] = None
    start_time_scheduled: Optional[Any] = Field(
        alias="startTimeScheduled", default=None
    )
    teams: Optional[List["UpdateSeriesTeamInput"]] = None
    title: Optional["UpdateSeriesTitleInput"] = None
    tournament: Optional["UpdateSeriesTournamentInput"] = None


class UpdateSeriesParticipatingPlayersInput(BaseModel):
    id: str


class UpdateSeriesTeamInput(BaseModel):
    score_advantage: int = Field(alias="scoreAdvantage")
    team_id: str = Field(alias="teamId")


class UpdateSeriesTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class UpdateSeriesTournamentInput(BaseModel):
    tournament_id: str = Field(alias="tournamentId")


class UpdateTeamInput(BaseModel):
    color_primary: Optional[Any] = Field(alias="colorPrimary", default=None)
    color_secondary: Optional[Any] = Field(alias="colorSecondary", default=None)
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    logo_data: Optional[str] = Field(alias="logoData", default=None)
    name: Optional[str] = None
    name_shortened: Optional[str] = Field(alias="nameShortened", default=None)
    private: Optional[bool] = None
    title: Optional["UpdateTeamTitleInput"] = None


class UpdateTeamTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


class UpdateTournamentInput(BaseModel):
    end_date: Optional["DateInput"] = Field(alias="endDate", default=None)
    external_links: Optional[List["ExternalLinkInput"]] = Field(
        alias="externalLinks", default=None
    )
    id: str
    logo_data: Optional[str] = Field(alias="logoData", default=None)
    name: Optional[str] = None
    name_shortened: Optional[str] = Field(alias="nameShortened", default=None)
    parent: Optional["UpdateTournamentParentInput"] = None
    private: Optional[bool] = None
    prize_pool: Optional["MoneyInput"] = Field(alias="prizePool", default=None)
    start_date: Optional["DateInput"] = Field(alias="startDate", default=None)
    teams: Optional[List["UpdateTournamentTeamInput"]] = None
    titles: Optional[List["UpdateTournamentTitleInput"]] = None
    venue_type: Optional[TournamentVenueType] = Field(alias="venueType", default=None)


class UpdateTournamentParentInput(BaseModel):
    tournament_id: Optional[str] = Field(alias="tournamentId", default=None)


class UpdateTournamentTeamInput(BaseModel):
    team_id: str = Field(alias="teamId")


class UpdateTournamentTitleInput(BaseModel):
    title_id: str = Field(alias="titleId")


BoundsInput.model_rebuild()
ContentCatalogEntityFilter.model_rebuild()
ContentCatalogEntityTitleFilter.model_rebuild()
ContentCatalogVersionFilter.model_rebuild()
ContentCatalogVersionTitleFilter.model_rebuild()
CreateContentCatalogCharacterInput.model_rebuild()
CreateContentCatalogItemInput.model_rebuild()
CreateContentCatalogMapInput.model_rebuild()
CreateContentCatalogVersionInput.model_rebuild()
CreatePlayerInput.model_rebuild()
CreatePlayerRoleInput.model_rebuild()
CreateSeriesInput.model_rebuild()
CreateTeamInput.model_rebuild()
CreateTournamentInput.model_rebuild()
ExternalLinkInput.model_rebuild()
GameFilter.model_rebuild()
MapFilter.model_rebuild()
NationalityFilter.model_rebuild()
OrganizationFilter.model_rebuild()
PlayerFilter.model_rebuild()
PlayerPlayerRoleFilter.model_rebuild()
PlayerRoleFilter.model_rebuild()
PlayerRoleTitleFilter.model_rebuild()
SeriesFilter.model_rebuild()
SeriesLiveFilter.model_rebuild()
SeriesPlayerFilter.model_rebuild()
SeriesTournamentFilter.model_rebuild()
SeriesTournamentTitleFilter.model_rebuild()
TeamFilter.model_rebuild()
TitleFilter.model_rebuild()
TournamentFilter.model_rebuild()
TournamentTitleFilter.model_rebuild()
UpdateContentCatalogCharacterInput.model_rebuild()
UpdateContentCatalogItemInput.model_rebuild()
UpdateContentCatalogMapInput.model_rebuild()
UpdatePlayerInput.model_rebuild()
UpdateSeriesInput.model_rebuild()
UpdateTeamInput.model_rebuild()
UpdateTournamentInput.model_rebuild()
