from __future__ import annotations
import json
from datetime import datetime
from dataclasses import dataclass, field
from tubeulator.utils.string_conv import to_camel_case
from pydantic import AliasGenerator, BaseModel, ConfigDict, PrivateAttr
from ..utils.paths import DtoEnum

class AccidentStatsAccidentDetailArray(BaseModel):
    """
    Autogenerated from AccidentStats::Tfl-Api-Presentation-Entities-AccidentStats-AccidentDetailArray
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='AccidentStats')
    _component_schema_name: str = PrivateAttr(default='Tfl-Api-Presentation-Entities-AccidentStats-AccidentDetailArray')


AccidentStatsAccidentDetailArrayModel = AccidentStatsAccidentDetailArray


class AccidentDetail(BaseModel):
    """
    Autogenerated from AccidentStats::Tfl.Api.Presentation.Entities.AccidentStats.AccidentDetail
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Id: int = None
    Lat: float = None
    Lon: float = None
    Location: str = None
    Date: datetime = None
    Severity: str = None
    Borough: str = None
    Casualties: list["CasualtyModel"]
    Vehicles: list["VehicleModel"]
    _source_schema_name: str = PrivateAttr(default='AccidentStats')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.AccidentStats.AccidentDetail')


AccidentDetailModel = AccidentDetail


class Casualty(BaseModel):
    """
    Autogenerated from AccidentStats::Tfl.Api.Presentation.Entities.AccidentStats.Casualty
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Age: int = None
    Class: str = None
    Severity: str = None
    Mode: str = None
    AgeBand: str = None
    _source_schema_name: str = PrivateAttr(default='AccidentStats')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.AccidentStats.Casualty')


CasualtyModel = Casualty


class Vehicle(BaseModel):
    """
    Autogenerated from AccidentStats::Tfl.Api.Presentation.Entities.AccidentStats.Vehicle
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Type: str = None
    _source_schema_name: str = PrivateAttr(default='AccidentStats')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.AccidentStats.Vehicle')


VehicleModel = Vehicle


class Deserialisers(DtoEnum):
    Tfl_Api_Presentation_Entities_AccidentStats_AccidentDetailArray = AccidentStatsAccidentDetailArray
    Tfl__Api__Presentation__Entities__AccidentStats__AccidentDetail = AccidentDetail
    Tfl__Api__Presentation__Entities__AccidentStats__Casualty = Casualty
    Tfl__Api__Presentation__Entities__AccidentStats__Vehicle = Vehicle