# Auto-generated by openrct2-codegen 0.5.0
# OpenRCT2 v0.4.32 (API v110)
# Generated: 2026-03-27T18:34:22.333002+00:00
#
# DO NOT EDIT -- regenerate with: openrct2-codegen render --template state.py

from __future__ import annotations

from typing import Annotated, Any, Literal, Union

from pydantic import BaseModel, Field, TypeAdapter

# API version this file was generated against.
GENERATED_API_VERSION: int = 110

# ── Flags models ──────────────────────────────────────────────────────────────

class ParkFlags(BaseModel):
    difficultGuestGeneration: bool
    difficultParkRating: bool
    forbidHighConstruction: bool
    forbidLandscapeChanges: bool
    forbidMarketingCampaigns: bool
    forbidTreeRemoval: bool
    freeParkEntry: bool
    noMoney: bool
    open: bool
    preferLessIntenseRides: bool
    preferMoreIntenseRides: bool
    scenarioCompleteNameInput: bool
    unlockAllPrices: bool

class PeepFlags(BaseModel):
    leavingPark: bool
    slowWalk: bool
    tracking: bool
    waving: bool
    hasPaidForParkEntry: bool
    photo: bool
    painting: bool
    wow: bool
    litter: bool
    lost: bool
    hunger: bool
    toilet: bool
    crowded: bool
    happiness: bool
    nausea: bool
    purple: bool
    pizza: bool
    explode: bool
    rideShouldBeMarkedAsFavourite: bool
    parkEntranceChosen: bool
    contagious: bool
    joy: bool
    angry: bool
    iceCream: bool
    hereWeAre: bool
    positionFrozen: bool
    animationFrozen: bool

# ── Models (topologically sorted) ─────────────────────────────────────────────

class Research(BaseModel):
    inventedItems: list[ResearchItem]
    uninventedItems: list[ResearchItem]
    lastResearchedItem: ResearchItem | None
    expectedItem: ResearchItem | None
    funding: int
    priorities: list[str]
    stage: str
    progress: int
    expectedMonth: int | None
    expectedDay: int | None

class ParkMessage(BaseModel):
    isArchived: bool
    month: int
    day: int
    tickCount: int
    type: str
    text: str
    subject: int | None

class Award(BaseModel):
    type: str
    text: str
    monthsRemaining: int
    imageId: int
    positive: bool

class ScenarioObjective(BaseModel):
    type: str
    guests: int
    year: int
    length: int
    excitement: int
    parkValue: int
    monthlyIncome: int

class WeatherState(BaseModel):
    weather: str
    temperature: int

class RideResearchItem(BaseModel):
    type: Literal["ride"]
    category: str
    rideType: int
    object: int

class SceneryResearchItem(BaseModel):
    category: Literal["scenery"]
    type: Literal["scenery"]
    object: int

class SpriteGroup(BaseModel):
    imageId: int
    spriteNumImages: int

class SpriteGroups(BaseModel):
    slopeFlat: SpriteGroup | None
    slopes12: SpriteGroup | None
    slopes25: SpriteGroup | None
    slopes42: SpriteGroup | None
    slopes60: SpriteGroup | None
    slopes75: SpriteGroup | None
    slopes90: SpriteGroup | None
    slopesLoop: SpriteGroup | None
    slopeInverted: SpriteGroup | None
    slopes8: SpriteGroup | None
    slopes16: SpriteGroup | None
    slopes50: SpriteGroup | None
    flatBanked22: SpriteGroup | None
    flatBanked45: SpriteGroup | None
    flatBanked67: SpriteGroup | None
    flatBanked90: SpriteGroup | None
    inlineTwists: SpriteGroup | None
    slopes12Banked22: SpriteGroup | None
    slopes8Banked22: SpriteGroup | None
    slopes25Banked22: SpriteGroup | None
    slopes8Banked45: SpriteGroup | None
    slopes16Banked22: SpriteGroup | None
    slopes16Banked45: SpriteGroup | None
    slopes25Banked45: SpriteGroup | None
    slopes12Banked45: SpriteGroup | None
    slopes25Banked67: SpriteGroup | None
    slopes25InlineTwists: SpriteGroup | None
    slopes42Banked22: SpriteGroup | None
    slopes42Banked45: SpriteGroup | None
    slopes42Banked90: SpriteGroup | None
    slopes60Banked22: SpriteGroup | None
    corkscrews: SpriteGroup | None
    restraintAnimation: SpriteGroup | None
    curvedLiftHillUp: SpriteGroup | None
    curvedLiftHillDown: SpriteGroup | None

class RideObjectVehicle(BaseModel):
    rotationFrameMask: int
    spacing: int
    carMass: int
    tabHeight: int
    numSeats: int
    spriteFlags: int
    spriteWidth: int
    spriteHeightNegative: int
    spriteHeightPositive: int
    animation: int
    flags: int
    baseNumFrames: int
    baseImageId: int
    spriteGroups: SpriteGroups
    noVehicleImages: int
    noSeatingRows: int
    spinningInertia: int
    spinningFriction: int
    frictionSoundId: int
    logFlumeReverserVehicleType: int
    soundRange: int
    doubleSoundFrequency: int
    poweredAcceleration: int
    poweredMaxSpeed: int
    carVisual: int
    effectVisual: int
    drawOrder: int
    numVerticalFramesOverride: int

class RideObject(BaseModel):
    description: str
    capacity: str
    flags: int
    rideType: Any
    minCarsInTrain: int
    maxCarsInTrain: int
    carsPerFlatRide: int
    zeroCars: int
    tabVehicle: int
    defaultVehicle: int
    frontVehicle: int
    secondVehicle: int
    rearVehicle: int
    thirdVehicle: int
    vehicles: list[RideObjectVehicle]
    excitementMultiplier: int
    intensityMultiplier: int
    nauseaMultiplier: int
    maxHeight: int
    shopItem: int
    shopItemSecondary: int

class TrackColour(BaseModel):
    main: int
    additional: int
    supports: int

class VehicleColour(BaseModel):
    body: int
    trim: int
    tertiary: int

class CoordsXYZ(BaseModel):
    z: int

class CoordsXYZD(BaseModel):
    direction: Any

class RideStation(BaseModel):
    start: CoordsXYZ
    length: int
    entrance: CoordsXYZD
    exit: CoordsXYZD

class Ride(BaseModel):
    object: RideObject
    id: int
    type: int
    classification: str
    name: str
    status: str
    flags: int
    lifecycleFlags: int
    mode: int
    departFlags: int
    minimumWaitingTime: int
    maximumWaitingTime: int
    vehicles: Any
    vehicleColours: list[VehicleColour]
    colourSchemes: list[TrackColour]
    stationStyle: int
    music: int
    stations: list[RideStation]
    price: Any
    excitement: int
    intensity: int
    nausea: int
    totalCustomers: int
    buildDate: int
    age: int
    runningCost: int
    totalProfit: int
    inspectionInterval: int
    value: int
    downtime: int
    liftHillSpeed: int
    maxLiftHillSpeed: int
    minLiftHillSpeed: int
    satisfaction: int
    maxSpeed: int
    averageSpeed: int
    rideTime: int
    rideLength: int
    maxPositiveVerticalGs: int
    maxNegativeVerticalGs: int
    maxLateralGs: int
    totalAirTime: int
    numDrops: int
    numLiftHills: int
    highestDropHeight: int
    breakdown: str

class CoordsXY(BaseModel):
    x: int
    y: int

class PatrolArea(BaseModel):
    tiles: list[CoordsXY]

class Handyman(BaseModel):
    id: int | None
    type: Any
    x: int
    y: int
    z: int
    flags: PeepFlags
    peepType: str
    name: str
    destination: CoordsXY
    direction: Any
    energy: int
    energyTarget: int
    staffType: Literal["handyman"]
    colour: int
    availableCostumes: list[str]
    costume: Any
    orders: int
    patrolArea: PatrolArea
    availableAnimations: list[str]
    animation: str
    animationOffset: int
    animationLength: int
    lawnsMown: int
    gardensWatered: int
    litterSwept: int
    binsEmptied: int

class Mechanic(BaseModel):
    id: int | None
    type: Any
    x: int
    y: int
    z: int
    flags: PeepFlags
    peepType: str
    name: str
    destination: CoordsXY
    direction: Any
    energy: int
    energyTarget: int
    staffType: Literal["mechanic"]
    colour: int
    availableCostumes: list[str]
    costume: Any
    orders: int
    patrolArea: PatrolArea
    availableAnimations: list[str]
    animation: str
    animationOffset: int
    animationLength: int
    ridesFixed: int
    ridesInspected: int

class Security(BaseModel):
    id: int | None
    type: Any
    x: int
    y: int
    z: int
    flags: PeepFlags
    peepType: str
    name: str
    destination: CoordsXY
    direction: Any
    energy: int
    energyTarget: int
    staffType: Literal["security"]
    colour: int
    availableCostumes: list[str]
    costume: Any
    orders: int
    patrolArea: PatrolArea
    availableAnimations: list[str]
    animation: str
    animationOffset: int
    animationLength: int
    vandalsStopped: int

class Entertainer(BaseModel):
    id: int | None
    type: Any
    x: int
    y: int
    z: int
    flags: PeepFlags
    peepType: str
    name: str
    destination: CoordsXY
    direction: Any
    energy: int
    energyTarget: int
    staffType: Literal["entertainer"]
    colour: int
    availableCostumes: list[str]
    costume: Any
    orders: int
    patrolArea: PatrolArea
    availableAnimations: list[str]
    animation: str
    animationOffset: int
    animationLength: int

class Thought(BaseModel):
    type: str
    item: int
    freshness: int
    freshTimeout: int

class GuestItem(BaseModel):
    type: str

class Guest(BaseModel):
    id: int | None
    type: Any
    x: int
    y: int
    z: int
    flags: PeepFlags
    peepType: str
    name: str
    destination: CoordsXY
    direction: Any
    energy: int
    energyTarget: int
    tshirtColour: int
    trousersColour: int
    balloonColour: int
    hatColour: int
    umbrellaColour: int
    happiness: int
    happinessTarget: int
    nausea: int
    nauseaTarget: int
    hunger: int
    thirst: int
    toilet: int
    mass: int
    minIntensity: int
    maxIntensity: int
    nauseaTolerance: int
    cash: int
    isInPark: bool
    isLost: bool
    lostCountdown: int
    thoughts: list[Thought]
    items: list[GuestItem]
    availableAnimations: list[str]
    animation: str
    animationOffset: int
    animationLength: int
    favouriteRide: int | None

# ── Union type aliases ────────────────────────────────────────────────────────

Staff = Annotated[
    Union[Handyman, Mechanic, Security, Entertainer],
    Field(discriminator="staffType"),
]

ResearchItem = Annotated[
    Union[RideResearchItem, SceneryResearchItem],
    Field(discriminator="type"),
]

# ── Namespace models ──────────────────────────────────────────────────────────

class Park(BaseModel):
    flags: ParkFlags
    cash: int
    rating: int
    bankLoan: int
    maxBankLoan: int
    entranceFee: int
    guests: int
    suggestedGuestMaximum: int
    guestGenerationProbability: int
    guestInitialCash: int
    guestInitialHappiness: int
    guestInitialHunger: int
    guestInitialThirst: int
    value: int
    companyValue: int
    totalRideValueForMoney: int
    totalAdmissions: int
    totalIncomeFromAdmissions: int
    landPrice: int
    constructionRightsPrice: int
    casualtyPenalty: int
    parkSize: int
    name: str
    research: Research
    messages: list[ParkMessage]
    awards: list[Award]

class Cheats(BaseModel):
    allowArbitraryRideTypeChanges: bool
    allowSpecialColourSchemes: bool
    allowTrackPlaceInvalidHeights: bool
    buildInPauseMode: bool
    disableAllBreakdowns: bool
    disableBrakesFailure: bool
    disableClearanceChecks: bool
    disableLittering: bool
    disablePlantAging: bool
    disableRideValueAging: bool
    disableSupportLimits: bool
    disableTrainLengthLimit: bool
    disableVandalism: bool
    enableAllDrawableTrackPieces: bool
    enableChainLiftOnAllTrack: bool
    fastLiftHill: bool
    forcedParkRating: int
    freezeWeather: bool
    ignoreResearchStatus: bool
    ignoreRideIntensity: bool
    ignoreRidePrice: bool
    neverendingMarketing: bool
    makeAllDestructible: bool
    sandboxMode: bool
    showAllOperatingModes: bool
    showVehiclesFromOtherTrackTypes: bool
    allowRegularPathAsQueue: bool

class GameDate(BaseModel):
    ticksElapsed: int
    monthsElapsed: int
    yearsElapsed: int
    monthProgress: int
    day: int
    month: int
    year: int

class Scenario(BaseModel):
    name: str
    details: str
    completedBy: str
    filename: str
    objective: ScenarioObjective
    parkRatingWarningDays: int
    completedCompanyValue: int | None
    status: str
    companyValueRecord: int

class Climate(BaseModel):
    type: str
    current: WeatherState
    future: WeatherState

# ── State proxy ───────────────────────────────────────────────────────────────

class StateProxy:
    """Typed query methods for all state endpoints. Do not edit."""

    def __init__(self, client) -> None:
        self._client = client

    def _query(self, endpoint: str) -> Any:
        return self._client._query(endpoint)

    def park(self) -> Park:
        return Park.model_validate(self._query("park"))

    def park_flags(self) -> ParkFlags:
        return ParkFlags.model_validate(self._query("park.flags"))

    def park_cash(self) -> int:
        return self._query("park.cash")

    def park_rating(self) -> int:
        return self._query("park.rating")

    def park_bank_loan(self) -> int:
        return self._query("park.bankLoan")

    def park_max_bank_loan(self) -> int:
        return self._query("park.maxBankLoan")

    def park_entrance_fee(self) -> int:
        return self._query("park.entranceFee")

    def park_guests(self) -> int:
        return self._query("park.guests")

    def park_suggested_guest_maximum(self) -> int:
        return self._query("park.suggestedGuestMaximum")

    def park_guest_generation_probability(self) -> int:
        return self._query("park.guestGenerationProbability")

    def park_guest_initial_cash(self) -> int:
        return self._query("park.guestInitialCash")

    def park_guest_initial_happiness(self) -> int:
        return self._query("park.guestInitialHappiness")

    def park_guest_initial_hunger(self) -> int:
        return self._query("park.guestInitialHunger")

    def park_guest_initial_thirst(self) -> int:
        return self._query("park.guestInitialThirst")

    def park_value(self) -> int:
        return self._query("park.value")

    def park_company_value(self) -> int:
        return self._query("park.companyValue")

    def park_total_ride_value_for_money(self) -> int:
        return self._query("park.totalRideValueForMoney")

    def park_total_admissions(self) -> int:
        return self._query("park.totalAdmissions")

    def park_total_income_from_admissions(self) -> int:
        return self._query("park.totalIncomeFromAdmissions")

    def park_land_price(self) -> int:
        return self._query("park.landPrice")

    def park_construction_rights_price(self) -> int:
        return self._query("park.constructionRightsPrice")

    def park_casualty_penalty(self) -> int:
        return self._query("park.casualtyPenalty")

    def park_park_size(self) -> int:
        return self._query("park.parkSize")

    def park_name(self) -> str:
        return self._query("park.name")

    def park_research(self) -> Research:
        return Research.model_validate(self._query("park.research"))

    def park_messages(self) -> list[ParkMessage]:
        return [ParkMessage.model_validate(x) for x in self._query("park.messages")]

    def park_awards(self) -> list[Award]:
        return [Award.model_validate(x) for x in self._query("park.awards")]

    def cheats(self) -> Cheats:
        return Cheats.model_validate(self._query("cheats"))

    def cheats_allow_arbitrary_ride_type_changes(self) -> bool:
        return self._query("cheats.allowArbitraryRideTypeChanges")

    def cheats_allow_special_colour_schemes(self) -> bool:
        return self._query("cheats.allowSpecialColourSchemes")

    def cheats_allow_track_place_invalid_heights(self) -> bool:
        return self._query("cheats.allowTrackPlaceInvalidHeights")

    def cheats_build_in_pause_mode(self) -> bool:
        return self._query("cheats.buildInPauseMode")

    def cheats_disable_all_breakdowns(self) -> bool:
        return self._query("cheats.disableAllBreakdowns")

    def cheats_disable_brakes_failure(self) -> bool:
        return self._query("cheats.disableBrakesFailure")

    def cheats_disable_clearance_checks(self) -> bool:
        return self._query("cheats.disableClearanceChecks")

    def cheats_disable_littering(self) -> bool:
        return self._query("cheats.disableLittering")

    def cheats_disable_plant_aging(self) -> bool:
        return self._query("cheats.disablePlantAging")

    def cheats_disable_ride_value_aging(self) -> bool:
        return self._query("cheats.disableRideValueAging")

    def cheats_disable_support_limits(self) -> bool:
        return self._query("cheats.disableSupportLimits")

    def cheats_disable_train_length_limit(self) -> bool:
        return self._query("cheats.disableTrainLengthLimit")

    def cheats_disable_vandalism(self) -> bool:
        return self._query("cheats.disableVandalism")

    def cheats_enable_all_drawable_track_pieces(self) -> bool:
        return self._query("cheats.enableAllDrawableTrackPieces")

    def cheats_enable_chain_lift_on_all_track(self) -> bool:
        return self._query("cheats.enableChainLiftOnAllTrack")

    def cheats_fast_lift_hill(self) -> bool:
        return self._query("cheats.fastLiftHill")

    def cheats_forced_park_rating(self) -> int:
        return self._query("cheats.forcedParkRating")

    def cheats_freeze_weather(self) -> bool:
        return self._query("cheats.freezeWeather")

    def cheats_ignore_research_status(self) -> bool:
        return self._query("cheats.ignoreResearchStatus")

    def cheats_ignore_ride_intensity(self) -> bool:
        return self._query("cheats.ignoreRideIntensity")

    def cheats_ignore_ride_price(self) -> bool:
        return self._query("cheats.ignoreRidePrice")

    def cheats_neverending_marketing(self) -> bool:
        return self._query("cheats.neverendingMarketing")

    def cheats_make_all_destructible(self) -> bool:
        return self._query("cheats.makeAllDestructible")

    def cheats_sandbox_mode(self) -> bool:
        return self._query("cheats.sandboxMode")

    def cheats_show_all_operating_modes(self) -> bool:
        return self._query("cheats.showAllOperatingModes")

    def cheats_show_vehicles_from_other_track_types(self) -> bool:
        return self._query("cheats.showVehiclesFromOtherTrackTypes")

    def cheats_allow_regular_path_as_queue(self) -> bool:
        return self._query("cheats.allowRegularPathAsQueue")

    def date(self) -> GameDate:
        return GameDate.model_validate(self._query("date"))

    def date_ticks_elapsed(self) -> int:
        return self._query("date.ticksElapsed")

    def date_months_elapsed(self) -> int:
        return self._query("date.monthsElapsed")

    def date_years_elapsed(self) -> int:
        return self._query("date.yearsElapsed")

    def date_month_progress(self) -> int:
        return self._query("date.monthProgress")

    def date_day(self) -> int:
        return self._query("date.day")

    def date_month(self) -> int:
        return self._query("date.month")

    def date_year(self) -> int:
        return self._query("date.year")

    def scenario(self) -> Scenario:
        return Scenario.model_validate(self._query("scenario"))

    def scenario_name(self) -> str:
        return self._query("scenario.name")

    def scenario_details(self) -> str:
        return self._query("scenario.details")

    def scenario_completed_by(self) -> str:
        return self._query("scenario.completedBy")

    def scenario_filename(self) -> str:
        return self._query("scenario.filename")

    def scenario_objective(self) -> ScenarioObjective:
        return ScenarioObjective.model_validate(self._query("scenario.objective"))

    def scenario_park_rating_warning_days(self) -> int:
        return self._query("scenario.parkRatingWarningDays")

    def scenario_completed_company_value(self) -> int | None:
        return self._query("scenario.completedCompanyValue")

    def scenario_status(self) -> str:
        return self._query("scenario.status")

    def scenario_company_value_record(self) -> int:
        return self._query("scenario.companyValueRecord")

    def climate(self) -> Climate:
        return Climate.model_validate(self._query("climate"))

    def climate_type(self) -> str:
        return self._query("climate.type")

    def climate_current(self) -> WeatherState:
        return WeatherState.model_validate(self._query("climate.current"))

    def climate_future(self) -> WeatherState:
        return WeatherState.model_validate(self._query("climate.future"))

    def rides(self) -> list[Ride]:
        return [Ride.model_validate(x) for x in self._query("rides")]

    def staff(self) -> list[Staff]:
        _adapter: TypeAdapter[Staff] = TypeAdapter(Staff)
        return [_adapter.validate_python(x) for x in self._query("staff")]

    def guests(self) -> list[Guest]:
        return [Guest.model_validate(x) for x in self._query("guests")]
