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 StopPointCategory(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.StopPointCategory
    """

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

    Category: str = None
    AvailableKeys: list[str] = []
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.StopPointCategory')


StopPointCategoryModel = StopPointCategory


class Mode(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.Mode
    """

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

    IsTflService: bool = None
    IsFarePaying: bool = None
    IsScheduledService: bool = None
    ModeName: str = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.Mode')


ModeModel = Mode


class PassengerFlow(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.PassengerFlow
    """

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

    TimeSlice: str = None
    Value: int = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.PassengerFlow')


PassengerFlowModel = PassengerFlow


class TrainLoading(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.TrainLoading
    """

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

    Line: str = None
    LineDirection: str = None
    PlatformDirection: str = None
    Direction: str = None
    NaptanTo: str = None
    TimeSlice: str = None
    Value: int = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.TrainLoading')


TrainLoadingModel = TrainLoading


class Crowding(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.Crowding
    """

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

    PassengerFlows: list["PassengerFlowModel"] = []
    TrainLoadings: list["TrainLoadingModel"] = []
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.Crowding')


CrowdingModel = Crowding


class Identifier(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.Identifier
    """

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

    Id: str = None
    Name: str = None
    Uri: str = None
    FullName: str = None
    Type: str = None
    Crowding: CrowdingModel = None
    RouteType: str = None
    Status: str = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.Identifier')


IdentifierModel = Identifier


class LineGroup(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.LineGroup
    """

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

    NaptanIdReference: str = None
    StationAtcoCode: str = None
    LineIdentifier: list[str] = []
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.LineGroup')


LineGroupModel = LineGroup


class LineModeGroup(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.LineModeGroup
    """

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

    ModeName: str = None
    LineIdentifier: list[str] = []
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.LineModeGroup')


LineModeGroupModel = LineModeGroup


class AdditionalProperties(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.AdditionalProperties
    """

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

    Category: str = None
    Key: str = None
    SourceSystemKey: str = None
    Value: str = None
    Modified: datetime = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.AdditionalProperties')


AdditionalPropertiesModel = AdditionalProperties


class Place(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.Place
    """

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

    Id: str = None
    Url: str = None
    CommonName: str = None
    Distance: float = None
    PlaceType: str = None
    AdditionalProperties: list["AdditionalPropertiesModel"] = []
    Children: list["PlaceModel"] = []
    ChildrenUrls: list[str] = []
    Lat: float = None
    Lon: float = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.Place')


PlaceModel = Place


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

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

    NaptanId: str = None
    PlatformName: str = None
    Indicator: str = None
    StopLetter: str = None
    Modes: list[str] = []
    IcsCode: str = None
    SmsCode: str = None
    StopType: str = None
    StationNaptan: str = None
    AccessibilitySummary: str = None
    HubNaptanCode: str = None
    Lines: list["IdentifierModel"] = []
    LineGroup: list["LineGroupModel"] = []
    LineModeGroups: list["LineModeGroupModel"] = []
    FullName: str = None
    NaptanMode: str = None
    Status: bool = None
    Id: str = None
    Url: str = None
    CommonName: str = None
    Distance: float = None
    PlaceType: str = None
    AdditionalProperties: list["AdditionalPropertiesModel"] = []
    Children: list["PlaceModel"] = []
    ChildrenUrls: list[str] = []
    Lat: float = None
    Lon: float = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.StopPoint')


StopPointModel = StopPoint


class LineServiceTypeInfo(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.LineServiceTypeInfo
    """

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

    Name: str = None
    Uri: str = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.LineServiceTypeInfo')


LineServiceTypeInfoModel = LineServiceTypeInfo


class LineSpecificServiceType(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.LineSpecificServiceType
    """

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

    ServiceType: LineServiceTypeInfoModel = None
    StopServesServiceType: bool = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.LineSpecificServiceType')


LineSpecificServiceTypeModel = LineSpecificServiceType


class LineServiceType(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.LineServiceType
    """

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

    LineName: str = None
    LineSpecificServiceTypes: list["LineSpecificServiceTypeModel"] = []
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.LineServiceType')


LineServiceTypeModel = LineServiceType


class PredictionTiming(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.PredictionTiming
    """

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

    CountdownServerAdjustment: str = None
    Source: datetime = None
    Insert: datetime = None
    Read: datetime = None
    Sent: datetime = None
    Received: datetime = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.PredictionTiming')


PredictionTimingModel = PredictionTiming


class Prediction(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.Prediction
    """

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

    Id: str = None
    OperationType: int = None
    VehicleId: str = None
    NaptanId: str = None
    StationName: str = None
    LineId: str = None
    LineName: str = None
    PlatformName: str = None
    Direction: str = None
    Bearing: str = None
    DestinationNaptanId: str = None
    DestinationName: str = None
    Timestamp: datetime = None
    TimeToStation: int = None
    CurrentLocation: str = None
    Towards: str = None
    ExpectedArrival: datetime = None
    TimeToLive: datetime = None
    ModeName: str = None
    Timing: PredictionTimingModel = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.Prediction')


PredictionModel = Prediction


class ArrivalDeparture(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.ArrivalDeparture
    """

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

    PlatformName: str = None
    DestinationNaptanId: str = None
    DestinationName: str = None
    NaptanId: str = None
    StationName: str = None
    EstimatedTimeOfArrival: datetime = None
    ScheduledTimeOfArrival: datetime = None
    EstimatedTimeOfDeparture: datetime = None
    ScheduledTimeOfDeparture: datetime = None
    MinutesAndSecondsToArrival: str = None
    MinutesAndSecondsToDeparture: str = None
    Cause: str = None
    DepartureStatus: str = None
    Timing: PredictionTimingModel = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.ArrivalDeparture')


ArrivalDepartureModel = ArrivalDeparture


class StopPointRouteSection(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.StopPointRouteSection
    """

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

    NaptanId: str = None
    LineId: str = None
    Mode: str = None
    ValidFrom: datetime = None
    ValidTo: datetime = None
    Direction: str = None
    RouteSectionName: str = None
    LineString: str = None
    IsActive: bool = None
    ServiceType: str = None
    VehicleDestinationText: str = None
    DestinationName: str = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.StopPointRouteSection')


StopPointRouteSectionModel = StopPointRouteSection


class DisruptedPoint(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.DisruptedPoint
    """

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

    AtcoCode: str = None
    FromDate: datetime = None
    ToDate: datetime = None
    Description: str = None
    CommonName: str = None
    Type: str = None
    Mode: str = None
    StationAtcoCode: str = None
    Appearance: str = None
    AdditionalInformation: str = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.DisruptedPoint')


DisruptedPointModel = DisruptedPoint


class StopPointsResponse(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.StopPointsResponse
    """

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

    CentrePoint: list[float] = []
    StopPoints: list["StopPointModel"] = []
    PageSize: int = None
    Total: int = None
    Page: int = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.StopPointsResponse')


StopPointsResponseModel = StopPointsResponse


class SearchMatch(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.SearchMatch
    """

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

    Id: str = None
    Url: str = None
    Name: str = None
    Lat: float = None
    Lon: float = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.SearchMatch')


SearchMatchModel = SearchMatch


class SearchResponse(BaseModel):
    """
    Autogenerated from StopPoint::Tfl.Api.Presentation.Entities.SearchResponse
    """

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

    Query: str = None
    From: int = None
    Page: int = None
    PageSize: int = None
    Provider: str = None
    Total: int = None
    Matches: list["SearchMatchModel"] = []
    MaxScore: float = None
    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='Tfl.Api.Presentation.Entities.SearchResponse')


SearchResponseModel = SearchResponse


class Object(BaseModel):
    """
    Autogenerated from StopPoint::System.Object
    """

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

    _source_schema_name: str = PrivateAttr(default='StopPoint')
    _component_schema_name: str = PrivateAttr(default='System.Object')


ObjectModel = Object


class Deserialisers(DtoEnum):
    Tfl__Api__Presentation__Entities__StopPointCategory = StopPointCategory
    Tfl__Api__Presentation__Entities__Mode = Mode
    Tfl__Api__Presentation__Entities__PassengerFlow = PassengerFlow
    Tfl__Api__Presentation__Entities__TrainLoading = TrainLoading
    Tfl__Api__Presentation__Entities__Crowding = Crowding
    Tfl__Api__Presentation__Entities__Identifier = Identifier
    Tfl__Api__Presentation__Entities__LineGroup = LineGroup
    Tfl__Api__Presentation__Entities__LineModeGroup = LineModeGroup
    Tfl__Api__Presentation__Entities__AdditionalProperties = AdditionalProperties
    Tfl__Api__Presentation__Entities__Place = Place
    Tfl__Api__Presentation__Entities__StopPoint = StopPoint
    Tfl__Api__Presentation__Entities__LineServiceTypeInfo = LineServiceTypeInfo
    Tfl__Api__Presentation__Entities__LineSpecificServiceType = LineSpecificServiceType
    Tfl__Api__Presentation__Entities__LineServiceType = LineServiceType
    Tfl__Api__Presentation__Entities__PredictionTiming = PredictionTiming
    Tfl__Api__Presentation__Entities__Prediction = Prediction
    Tfl__Api__Presentation__Entities__ArrivalDeparture = ArrivalDeparture
    Tfl__Api__Presentation__Entities__StopPointRouteSection = StopPointRouteSection
    Tfl__Api__Presentation__Entities__DisruptedPoint = DisruptedPoint
    Tfl__Api__Presentation__Entities__StopPointsResponse = StopPointsResponse
    Tfl__Api__Presentation__Entities__SearchMatch = SearchMatch
    Tfl__Api__Presentation__Entities__SearchResponse = SearchResponse
    System__Object = Object